9fdd7860 | 21-Oct-2019 |
Eduardo Habkost <ehabkost@redhat.com> |
image-fuzzer: Use OSerror.strerror instead of tuple subscript
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 <jsnow@
image-fuzzer: Use OSerror.strerror instead of tuple subscript
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 <jsnow@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 20191021214117.18091-1-ehabkost@redhat.com Message-Id: <20191021214117.18091-1-ehabkost@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
show more ...
|
fca538a1 | 16-Oct-2019 |
Eduardo Habkost <ehabkost@redhat.com> |
image-fuzzer: Use errors parameter of subprocess.Popen()
Instead of manually encoding stderr and stdout output, use `errors` parameter of subprocess.Popen(). This will make process.communicate() re
image-fuzzer: Use errors parameter of subprocess.Popen()
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 <ehabkost@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20191016192430.25098-11-ehabkost@redhat.com Message-Id: <20191016192430.25098-11-ehabkost@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
show more ...
|
73bdbb84 | 16-Oct-2019 |
Eduardo Habkost <ehabkost@redhat.com> |
image-fuzzer: Run using python3
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
image-fuzzer: Run using python3
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 <ehabkost@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20191016192430.25098-10-ehabkost@redhat.com Message-Id: <20191016192430.25098-10-ehabkost@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
show more ...
|
58b818d5 | 16-Oct-2019 |
Eduardo Habkost <ehabkost@redhat.com> |
image-fuzzer: Encode file name and file format to bytes
Callers of create_image() will pass strings as arguments, but the Image class will expect bytes objects to be provided. Encode them inside cr
image-fuzzer: Encode file name and file format to bytes
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 <ehabkost@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20191016192430.25098-9-ehabkost@redhat.com Message-Id: <20191016192430.25098-9-ehabkost@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
show more ...
|
ee1fde71 | 16-Oct-2019 |
Eduardo Habkost <ehabkost@redhat.com> |
image-fuzzer: Use bytes constant for field values
Field values are supposed to be bytes objects, not unicode strings. Change two constants that were declared as strings.
Signed-off-by: Eduardo Hab
image-fuzzer: Use bytes constant for field values
Field values are supposed to be bytes objects, not unicode strings. Change two constants that were declared as strings.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20191016192430.25098-8-ehabkost@redhat.com Message-Id: <20191016192430.25098-8-ehabkost@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
show more ...
|
71858451 | 16-Oct-2019 |
Eduardo Habkost <ehabkost@redhat.com> |
image-fuzzer: Return bytes objects on string fuzzing functions
No caller of fuzzer functions is interested in unicode string values, so replace them with bytes sequences.
Signed-off-by: Eduardo Hab
image-fuzzer: Return bytes objects on string fuzzing functions
No caller of fuzzer functions is interested in unicode string values, so replace them with bytes sequences.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20191016192430.25098-7-ehabkost@redhat.com Message-Id: <20191016192430.25098-7-ehabkost@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
show more ...
|
c439143b | 16-Oct-2019 |
Eduardo Habkost <ehabkost@redhat.com> |
image-fuzzer: Use %r for all fiels at Field.__repr__()
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 <ehabk
image-fuzzer: Use %r for all fiels at Field.__repr__()
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 <ehabkost@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20191016192430.25098-6-ehabkost@redhat.com Message-Id: <20191016192430.25098-6-ehabkost@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
show more ...
|
8353546d | 16-Oct-2019 |
Eduardo Habkost <ehabkost@redhat.com> |
image-fuzzer: Use io.StringIO
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 modul
image-fuzzer: Use io.StringIO
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 <ehabkost@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20191016192430.25098-5-ehabkost@redhat.com Message-Id: <20191016192430.25098-5-ehabkost@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
show more ...
|
d974451c | 16-Oct-2019 |
Eduardo Habkost <ehabkost@redhat.com> |
image-fuzzer: Explicitly use integer division operator
Most of the division expressions in image-fuzzer assume integer division. Use the // operator to keep the same behavior when we move to Python
image-fuzzer: Explicitly use integer division operator
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 <ehabkost@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20191016192430.25098-4-ehabkost@redhat.com Message-Id: <20191016192430.25098-4-ehabkost@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
show more ...
|
c314e50b | 16-Oct-2019 |
Eduardo Habkost <ehabkost@redhat.com> |
image-fuzzer: Write bytes instead of string to image file
This is necessary for Python 3 compatibility.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com
image-fuzzer: Write bytes instead of string to image file
This is necessary for Python 3 compatibility.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20191016192430.25098-3-ehabkost@redhat.com Message-Id: <20191016192430.25098-3-ehabkost@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
show more ...
|
cd67daaa | 08-Jun-2018 |
Eduardo Habkost <ehabkost@redhat.com> |
python: futurize -f lib2to3.fixes.fix_renames
Change sys.maxint to sys.maxsize.
This is necessary for Python 3 compatibility.
Done using:
$ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -
python: futurize -f lib2to3.fixes.fix_renames
Change sys.maxint to sys.maxsize.
This is necessary for Python 3 compatibility.
Done using:
$ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \ sort -u | grep -v README.sh4) $ futurize -w -f lib2to3.fixes.fix_renames $py
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20180608122952.2009-9-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
show more ...
|
d24d523c | 08-Jun-2018 |
Eduardo Habkost <ehabkost@redhat.com> |
python: futurize -f libfuturize.fixes.fix_next_call
Change obj.next() calls to next(obj).
This is necessary for Python 3 compatibility.
Done using:
$ py=$( (g grep -l -E '^#!.*python';find -nam
python: futurize -f libfuturize.fixes.fix_next_call
Change obj.next() calls to next(obj).
This is necessary for Python 3 compatibility.
Done using:
$ py=$( (g grep -l -E '^#!.*python';find -name '*.py' -printf '%P\n';) | \ sort -u | grep -v README.sh4) $ futurize -w -f libfuturize.fixes.fix_next_call $py
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20180608122952.2009-4-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
show more ...
|
550830f9 | 16-Sep-2014 |
Stefan Hajnoczi <stefanha@redhat.com> |
block: delete cow block driver
This patch removes support for the cow file format.
Normally we do not break backwards compatibility but in this case there is no impact and it is the most logical op
block: delete cow block driver
This patch removes support for the cow file format.
Normally we do not break backwards compatibility but in this case there is no impact and it is the most logical option. Extraordinary claims require extraordinary evidence so I will show why removing the cow block driver is the right thing to do.
The cow file format is the disk image format for Usermode Linux, a way of running a Linux system in userspace. The performance of UML was never great and it was hacky, but it enjoyed some popularity before hardware virtualization support became mainstream.
QEMU's block/cow.c is supposed to read this image file format. Unfortunately the file format was underspecified:
1. Earlier Linux versions used the MAXPATHLEN constant for the backing filename field. The value of MAXPATHLEN can change, so Linux switched to a 4096 literal but QEMU has a 1024 literal.
2. Padding was not used on the header struct (both in the Linux kernel and in QEMU) so the struct layout varied across architectures. In particular, i386 and x86_64 were different due to int64_t alignment differences. Linux now uses __attribute__((packed)), QEMU does not.
Therefore:
1. QEMU cow images do not conform to the Linux cow image file format.
2. cow images cannot be shared between different host architectures.
This means QEMU cow images are useless and QEMU has not had bug reports from users actually hitting these issues.
Let's get rid of this thing, it serves no purpose and no one will be affected.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: 1410877464-20481-1-git-send-email-stefanha@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
show more ...
|
1e8fd8d4 | 19-Aug-2014 |
Maria Kustova <maxa@catit.be> |
layout: Add generators for refcount table and blocks
Refcount structures are placed in clusters randomly selected from all unallocated host clusters.
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.c
layout: Add generators for refcount table and blocks
Refcount structures are placed in clusters randomly selected from all unallocated host clusters.
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Maria Kustova <maria.k@catit.be> Reviewed-by: Fam Zheng <famz@redhat.com> Message-id: 7e2f38608db6fba2da53997390b19400d445c45d.1408450493.git.maria.k@catit.be Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
show more ...
|
18a7d0c5 | 18-Aug-2014 |
Maria Kustova <maxa@catit.be> |
runner: Kill a program under test by time-out
If a program under test get frozen, the test should finish and report about its failure. In such cases the runner waits for 10 minutes until the program
runner: Kill a program under test by time-out
If a program under test get frozen, the test should finish and report about its failure. In such cases the runner waits for 10 minutes until the program ends its execution. After this time-out the program will be terminated and the test will be marked as failed.
For current limitation of test image size to 10 MB as a maximum an execution of each command takes about several seconds in general, so 10 minutes is enough to discriminate freeze, but not drastically increase an overall test duration.
Signed-off-by: Maria Kustova <maria.k@catit.be> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|
94c83a24 | 11-Aug-2014 |
Maria Kustova <maxa@catit.be> |
image-fuzzer: Reduce number of generator functions in __init__
Some issues can be found only when a fuzzed image has a partial structure, e.g. has L1/L2 tables but no refcount ones. Generation of an
image-fuzzer: Reduce number of generator functions in __init__
Some issues can be found only when a fuzzed image has a partial structure, e.g. has L1/L2 tables but no refcount ones. Generation of an entirely defined image limits these cases. Now the Image constructor creates only a header and a backing file name (if any), other image elements are generated in the 'create_image' API.
Signed-off-by: Maria Kustova <maria.k@catit.be> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
show more ...
|