<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bwlp/qemu.git/tests/image-fuzzer, branch spice_video_codecs</title>
<subtitle>Experimental fork of QEMU with video encoding patches</subtitle>
<id>https://git.openslx.org/bwlp/qemu.git/atom/tests/image-fuzzer?h=spice_video_codecs</id>
<link rel='self' href='https://git.openslx.org/bwlp/qemu.git/atom/tests/image-fuzzer?h=spice_video_codecs'/>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/'/>
<updated>2019-11-05T15:36:11+00:00</updated>
<entry>
<title>image-fuzzer: Use OSerror.strerror instead of tuple subscript</title>
<updated>2019-11-05T15:36:11+00:00</updated>
<author>
<name>Eduardo Habkost</name>
</author>
<published>2019-10-21T21:41:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=9fdd7860adec188ed50d2530e9a819e8d953f9bb'/>
<id>urn:sha1:9fdd7860adec188ed50d2530e9a819e8d953f9bb</id>
<content type='text'>
OSError can't be used like a tuple on Python 3, so change the
code to use `e.sterror` instead of `e[1]`.

Reported-by: John Snow &lt;jsnow@redhat.com&gt;
Signed-off-by: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
Reviewed-by: John Snow &lt;jsnow@redhat.com&gt;
Message-id: 20191021214117.18091-1-ehabkost@redhat.com
Message-Id: &lt;20191021214117.18091-1-ehabkost@redhat.com&gt;
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>image-fuzzer: Use errors parameter of subprocess.Popen()</title>
<updated>2019-11-05T15:35:06+00:00</updated>
<author>
<name>Eduardo Habkost</name>
</author>
<published>2019-10-16T19:24:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=fca538a17124139d0270a5e2eb8da0dea50b4d5a'/>
<id>urn:sha1:fca538a17124139d0270a5e2eb8da0dea50b4d5a</id>
<content type='text'>
Instead of manually encoding stderr and stdout output, use
`errors` parameter of subprocess.Popen().  This will make
process.communicate() return unicode strings instead of bytes
objects.

Signed-off-by: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
Reviewed-by: John Snow &lt;jsnow@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Message-id: 20191016192430.25098-11-ehabkost@redhat.com
Message-Id: &lt;20191016192430.25098-11-ehabkost@redhat.com&gt;
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>image-fuzzer: Run using python3</title>
<updated>2019-11-05T15:35:06+00:00</updated>
<author>
<name>Eduardo Habkost</name>
</author>
<published>2019-10-16T19:24:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=73bdbb84ec710c53ca8318a2bff8640b6d7e31f2'/>
<id>urn:sha1:73bdbb84ec710c53ca8318a2bff8640b6d7e31f2</id>
<content type='text'>
image-fuzzer is now supposed to be ready to run using Python 3.
Remove the __future__ imports and change the interpreter line to
"#!/usr/bin/env python3".

Signed-off-by: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
Reviewed-by: John Snow &lt;jsnow@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Message-id: 20191016192430.25098-10-ehabkost@redhat.com
Message-Id: &lt;20191016192430.25098-10-ehabkost@redhat.com&gt;
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>image-fuzzer: Encode file name and file format to bytes</title>
<updated>2019-11-05T15:35:06+00:00</updated>
<author>
<name>Eduardo Habkost</name>
</author>
<published>2019-10-16T19:24:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=58b818d5bdcb89e89e60b7b1f68d808882186ccc'/>
<id>urn:sha1:58b818d5bdcb89e89e60b7b1f68d808882186ccc</id>
<content type='text'>
Callers of create_image() will pass strings as arguments, but the
Image class will expect bytes objects to be provided.  Encode
them inside create_image().

Signed-off-by: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
Reviewed-by: John Snow &lt;jsnow@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Message-id: 20191016192430.25098-9-ehabkost@redhat.com
Message-Id: &lt;20191016192430.25098-9-ehabkost@redhat.com&gt;
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>image-fuzzer: Use bytes constant for field values</title>
<updated>2019-11-05T15:35:06+00:00</updated>
<author>
<name>Eduardo Habkost</name>
</author>
<published>2019-10-16T19:24:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=ee1fde71a343b9311b39aa3f8d56ba0330abe449'/>
<id>urn:sha1:ee1fde71a343b9311b39aa3f8d56ba0330abe449</id>
<content type='text'>
Field values are supposed to be bytes objects, not unicode
strings.  Change two constants that were declared as strings.

Signed-off-by: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
Reviewed-by: John Snow &lt;jsnow@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Message-id: 20191016192430.25098-8-ehabkost@redhat.com
Message-Id: &lt;20191016192430.25098-8-ehabkost@redhat.com&gt;
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>image-fuzzer: Return bytes objects on string fuzzing functions</title>
<updated>2019-11-05T15:35:06+00:00</updated>
<author>
<name>Eduardo Habkost</name>
</author>
<published>2019-10-16T19:24:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=718584519771359b8517e4493e39cdf8744aa99c'/>
<id>urn:sha1:718584519771359b8517e4493e39cdf8744aa99c</id>
<content type='text'>
No caller of fuzzer functions is interested in unicode string values,
so replace them with bytes sequences.

Signed-off-by: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
Reviewed-by: John Snow &lt;jsnow@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Message-id: 20191016192430.25098-7-ehabkost@redhat.com
Message-Id: &lt;20191016192430.25098-7-ehabkost@redhat.com&gt;
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>image-fuzzer: Use %r for all fiels at Field.__repr__()</title>
<updated>2019-11-05T15:35:06+00:00</updated>
<author>
<name>Eduardo Habkost</name>
</author>
<published>2019-10-16T19:24:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=c439143b7f853b8ecd4baff64ac41cf754db18e6'/>
<id>urn:sha1:c439143b7f853b8ecd4baff64ac41cf754db18e6</id>
<content type='text'>
This makes the formatting code simpler, and safer if we change
the type of self.value from str to bytes.

Signed-off-by: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
Reviewed-by: John Snow &lt;jsnow@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Message-id: 20191016192430.25098-6-ehabkost@redhat.com
Message-Id: &lt;20191016192430.25098-6-ehabkost@redhat.com&gt;
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>image-fuzzer: Use io.StringIO</title>
<updated>2019-11-05T15:35:06+00:00</updated>
<author>
<name>Eduardo Habkost</name>
</author>
<published>2019-10-16T19:24:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=8353546de54a6b1143ed23f62c976a986369fcf1'/>
<id>urn:sha1:8353546de54a6b1143ed23f62c976a986369fcf1</id>
<content type='text'>
StringIO.StringIO is not available on Python 3, but io.StringIO
is available on both Python 2 and 3.  io.StringIO is slightly
different from the Python 2 StringIO module, though, so we need
bytes coming from subprocess.Popen() to be explicitly decoded.

Signed-off-by: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
Reviewed-by: John Snow &lt;jsnow@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Message-id: 20191016192430.25098-5-ehabkost@redhat.com
Message-Id: &lt;20191016192430.25098-5-ehabkost@redhat.com&gt;
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>image-fuzzer: Explicitly use integer division operator</title>
<updated>2019-11-05T15:35:06+00:00</updated>
<author>
<name>Eduardo Habkost</name>
</author>
<published>2019-10-16T19:24:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=d974451c5bc9a0bdf07a8299edf75c0f66a86e04'/>
<id>urn:sha1:d974451c5bc9a0bdf07a8299edf75c0f66a86e04</id>
<content type='text'>
Most of the division expressions in image-fuzzer assume integer
division.  Use the // operator to keep the same behavior when we
move to Python 3.

Signed-off-by: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
Reviewed-by: John Snow &lt;jsnow@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Message-id: 20191016192430.25098-4-ehabkost@redhat.com
Message-Id: &lt;20191016192430.25098-4-ehabkost@redhat.com&gt;
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>image-fuzzer: Write bytes instead of string to image file</title>
<updated>2019-11-05T15:35:06+00:00</updated>
<author>
<name>Eduardo Habkost</name>
</author>
<published>2019-10-16T19:24:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=c314e50b8ace8a66b732f3541d58b2592d4427a9'/>
<id>urn:sha1:c314e50b8ace8a66b732f3541d58b2592d4427a9</id>
<content type='text'>
This is necessary for Python 3 compatibility.

Signed-off-by: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
Reviewed-by: John Snow &lt;jsnow@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Message-id: 20191016192430.25098-3-ehabkost@redhat.com
Message-Id: &lt;20191016192430.25098-3-ehabkost@redhat.com&gt;
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
</feed>
