iotests: Fix CID for VMDK afl image
PATCH 1/1 iotests: Fix CID for VMDK afl image
This reverts commit 76bf133c4 which updated the reference output, and fixed the reference image, because the code path we want to exercise is actually the invalid image size.
The descriptor block in the image, which includes the CID to verify, has been invalid since the reference image was added. Since commit 9877860e7bd we report this error earlier than the "file too large", so 059.out mismatches.
The binary change is generated along the operations of:
$ bunzip2 afl9.vmdk.bz2 $ qemu-img create -f vmdk fix.vmdk 1G $ dd if=afl9.vmdk.bz2 of=fix.vmdk bs=512 count=1 conv=notrunc $ mv fix.vmdk afl9.vmdk $ bzip2 afl9.vmdk
---
v2: Fix commit message "qcow2 -> vmdk". [Kevin]
Revert 76bf133c4. --- tests/qemu-iotests/059.out | 2 +- tests/qemu-iotests/sample_images/afl9.vmdk.bz2 | Bin 178 -> 618 bytes 2 files changed, 1 insertion(+), 1 deletion(-)
tests/qemu-iotests/059.out +1 -1
@@ -2358,5 +2358,5 @@ Offset Length Mapped to File 0x140000000 0x10000 0x50000 TEST_DIR/t-s003.vmdk === Testing afl image with a very large capacity === -qemu-img: Could not open 'TEST_DIR/afl9.IMGFMT': Could not open 'TEST_DIR/afl9.IMGFMT': Invalid argument +qemu-img: Can't get image size 'TEST_DIR/afl9.IMGFMT': File too large *** done
tests/qemu-iotests/sample_images/afl9.vmdk.bz2 binary +0 -0
Signature · 1 line
2.14.3
Quoted 8 lines · Fam Zheng
This reverts commit
76bf133c4which updated the reference output, and fixed the reference image, because the code path we want to exercise is actually the invalid image size.The descriptor block in the image, which includes the CID to verify, has been invalid since the reference image was added. Since commit
9877860e7bdwe report this error earlier than the "file too large", so 059.out mismatches.
Quoted 5 lines
The binary change is generated along the operations of:
$ bunzip2 afl9.vmdk.bz2 $ qemu-img create -f vmdk fix.vmdk 1G $ dd if=afl9.vmdk.bz2 of=fix.vmdk bs=512 count=1 conv=notrunc
Is the .bz2 suffix spurious here?
Quoted 7 lines
$ mv fix.vmdk afl9.vmdk $ bzip2 afl9.vmdkSigned-off-by Fam Zheng <[email protected]>---
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Quoted 9 lines · Eric Blake
Quoted 8 lines · Fam Zheng
This reverts commit
76bf133c4which updated the reference output, and fixed the reference image, because the code path we want to exercise is actually the invalid image size.The descriptor block in the image, which includes the CID to verify, has been invalid since the reference image was added. Since commit
9877860e7bdwe report this error earlier than the "file too large", so 059.out mismatches.
Quoted 7 lines
Quoted 5 lines
The binary change is generated along the operations of:
$ bunzip2 afl9.vmdk.bz2 $ qemu-img create -f vmdk fix.vmdk 1G $ dd if=afl9.vmdk.bz2 of=fix.vmdk bs=512 count=1 conv=notruncIs the .bz2 suffix spurious here?
Hmm, yes. I have no idea why it is here. :-/
Fam
Quoted 16 lines
Quoted 8 lines
$ mv fix.vmdk afl9.vmdk $ bzip2 afl9.vmdkSigned-off-by Fam Zheng <[email protected]>---
Reviewed-by Eric Blake <[email protected]>--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
Kevin Wolf
AppliedAm 30.01.2018 um 07:25 hat Fam Zheng geschrieben:
Quoted 10 lines
This reverts commit
76bf133c4which updated the reference output, and fixed the reference image, because the code path we want to exercise is actually the invalid image size.The descriptor block in the image, which includes the CID to verify, has been invalid since the reference image was added. Since commit
9877860e7bdwe report this error earlier than the "file too large", so 059.out mismatches.The binary change is generated along the operations of:
Quoted 7 lines
$ bunzip2 afl9.vmdk.bz2 $ qemu-img create -f vmdk fix.vmdk 1G $ dd if=afl9.vmdk.bz2 of=fix.vmdk bs=512 count=1 conv=notrunc $ mv fix.vmdk afl9.vmdk $ bzip2 afl9.vmdkSigned-off-by Fam Zheng <[email protected]>
Thanks, applied to the block branch.
Kevin
Quoted 16 lines · Fam Zheng
This reverts commit
76bf133c4which updated the reference output, and fixed the reference image, because the code path we want to exercise is actually the invalid image size.The descriptor block in the image, which includes the CID to verify, has been invalid since the reference image was added. Since commit
9877860e7bdwe report this error earlier than the "file too large", so 059.out mismatches.The binary change is generated along the operations of:
$ bunzip2 afl9.vmdk.bz2 $ qemu-img create -f vmdk fix.vmdk 1G $ dd if=afl9.vmdk.bz2 of=fix.vmdk bs=512 count=1 conv=notrunc $ mv fix.vmdk afl9.vmdk $ bzip2 afl9.vmdk
Quoted 6 lines
Signed-off-by Fam Zheng <[email protected]>---
v2: Fix commit message "qcow2 -> vmdk". [Kevin]
Revert 76bf133c4.
Hmmmm, now this fails again on my 32 bit build. :-(
The issue there is that you get a "Cannot allocate memory" when trying to open the file. My current fix was 2291712c39111a732 which simply converted that to "Invalid argument", but now it's getting a bit more complicated... Should I just continue to play the game and check the output for "Cannot allocate memory" and print exactly what the reference output is expecting...?
Max
Quoted 24 lines · Max Reitz
Quoted 16 lines · Fam Zheng
This reverts commit
76bf133c4which updated the reference output, and fixed the reference image, because the code path we want to exercise is actually the invalid image size.The descriptor block in the image, which includes the CID to verify, has been invalid since the reference image was added. Since commit
9877860e7bdwe report this error earlier than the "file too large", so 059.out mismatches.The binary change is generated along the operations of:
$ bunzip2 afl9.vmdk.bz2 $ qemu-img create -f vmdk fix.vmdk 1G $ dd if=afl9.vmdk.bz2 of=fix.vmdk bs=512 count=1 conv=notrunc $ mv fix.vmdk afl9.vmdk $ bzip2 afl9.vmdkQuoted 6 lines
Signed-off-by Fam Zheng <[email protected]>---
v2: Fix commit message "qcow2 -> vmdk". [Kevin]
Revert 76bf133c4.
Quoted 8 lines
Hmmmm, now this fails again on my 32 bit build. :-(
The issue there is that you get a "Cannot allocate memory" when trying to open the file. My current fix was
2291712c39111a732which simply converted that to "Invalid argument", but now it's getting a bit more complicated... Should I just continue to play the game and check the output for "Cannot allocate memory" and print exactly what the reference output is expecting...?
Ahhh. OK, then, with a big comment.
I'd say let's just _notrun on 32 bit.
Fam
Quoted 34 lines · Fam Zheng
Quoted 24 lines · Max Reitz
Quoted 16 lines · Fam Zheng
This reverts commit
76bf133c4which updated the reference output, and fixed the reference image, because the code path we want to exercise is actually the invalid image size.The descriptor block in the image, which includes the CID to verify, has been invalid since the reference image was added. Since commit
9877860e7bdwe report this error earlier than the "file too large", so 059.out mismatches.The binary change is generated along the operations of:
$ bunzip2 afl9.vmdk.bz2 $ qemu-img create -f vmdk fix.vmdk 1G $ dd if=afl9.vmdk.bz2 of=fix.vmdk bs=512 count=1 conv=notrunc $ mv fix.vmdk afl9.vmdk $ bzip2 afl9.vmdkQuoted 6 lines
Signed-off-by Fam Zheng <[email protected]>---
v2: Fix commit message "qcow2 -> vmdk". [Kevin]
Revert 76bf133c4.Quoted 8 lines
Hmmmm, now this fails again on my 32 bit build. :-(
The issue there is that you get a "Cannot allocate memory" when trying to open the file. My current fix was
2291712c39111a732which simply converted that to "Invalid argument", but now it's getting a bit more complicated... Should I just continue to play the game and check the output for "Cannot allocate memory" and print exactly what the reference output is expecting...?
Quoted 3 lines
Ahhh. OK, then, with a big comment.
I'd say let's just
_notrunon 32 bit.
Sounds OK, but how would we test that? uname? Or just _notrun when we see the ENOMEM message?
Max
Quoted 9 lines · Max Reitz
Quoted 9 lines
Quoted 8 lines
Hmmmm, now this fails again on my 32 bit build. :-(
The issue there is that you get a "Cannot allocate memory" when trying to open the file. My current fix was
2291712c39111a732which simply converted that to "Invalid argument", but now it's getting a bit more complicated... Should I just continue to play the game and check the output for "Cannot allocate memory" and print exactly what the reference output is expecting...?
Quoted 6 lines
Quoted 3 lines
Ahhh. OK, then, with a big comment.
I'd say let's just
_notrunon 32 bit.Sounds OK, but how would we test that? uname? Or just
_notrunwhen we see the ENOMEM message?
_notrun when you detect ENOMEM seems reasonable (the equivalent of exit status 77 in skipping a test in an automake context)
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org