diff options
author | Maria Kustova | 2014-09-14 14:07:02 +0200 |
---|---|---|
committer | Stefan Hajnoczi | 2014-09-22 12:39:30 +0200 |
commit | 407ba0844d90a344e5ed012129e6e40e091bf48b (patch) | |
tree | 86eee900268636cc09ad088fb5492211a461b9b1 /tests/image-fuzzer/qcow2 | |
parent | iotests: Add more tests for qcow2 corruption (diff) | |
download | qemu-407ba0844d90a344e5ed012129e6e40e091bf48b.tar.gz qemu-407ba0844d90a344e5ed012129e6e40e091bf48b.tar.xz qemu-407ba0844d90a344e5ed012129e6e40e091bf48b.zip |
image-fuzzer: Trivial readability and formatting improvements
Signed-off-by: Maria Kustova <maria.k@catit.be>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests/image-fuzzer/qcow2')
-rw-r--r-- | tests/image-fuzzer/qcow2/fuzz.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/image-fuzzer/qcow2/fuzz.py b/tests/image-fuzzer/qcow2/fuzz.py index 57527f9b4a..404b439f48 100644 --- a/tests/image-fuzzer/qcow2/fuzz.py +++ b/tests/image-fuzzer/qcow2/fuzz.py @@ -332,9 +332,8 @@ def l1_entry(current): constraints = UINT64_V # Reserved bits are ignored # Added a possibility when only flags are fuzzed - offset = 0x7fffffffffffffff & random.choice([selector(current, - constraints), - current]) + offset = 0x7fffffffffffffff & \ + random.choice([selector(current, constraints), current]) is_cow = random.randint(0, 1) return offset + (is_cow << UINT64_M) @@ -344,9 +343,8 @@ def l2_entry(current): constraints = UINT64_V # Reserved bits are ignored # Add a possibility when only flags are fuzzed - offset = 0x3ffffffffffffffe & random.choice([selector(current, - constraints), - current]) + offset = 0x3ffffffffffffffe & \ + random.choice([selector(current, constraints), current]) is_compressed = random.randint(0, 1) is_cow = random.randint(0, 1) is_zero = random.randint(0, 1) |