iotests: Fix CID for VMDK afl image
PATCH 1/1 iotests: Fix CID for VMDK afl image
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.
Instead of fixing the output, we fix the image descriptor, because the code path we want to exercise is actually the invalid image size.
The binary change is generated along the operations of:
$ bunzip2 afl9.vmdk.bz2 $ qemu-img create -f qcow2 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
--- tests/qemu-iotests/sample_images/afl9.vmdk.bz2 | Bin 178 -> 618 bytes 1 file changed, 0 insertions(+), 0 deletions(-)
tests/qemu-iotests/sample_images/afl9.vmdk.bz2 binary +0 -0
Signature · 1 line
2.14.3
Am 24.01.2018 um 05:42 hat Fam Zheng geschrieben:
Quoted 11 lines
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.Instead of fixing the output, we fix the image descriptor, because the code path we want to exercise is actually the invalid image size.
The binary change is generated along the operations of:
$ bunzip2 afl9.vmdk.bz2 $ qemu-img create -f qcow2 fix.vmdk 1G
Sure about -f qcow2? :-)
Quoted 8 lines
$ 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]>--- tests/qemu-iotests/sample_images/afl9.vmdk.bz2 | Bin 178 -> 618 bytes 1 file changed, 0 insertions(+), 0 deletions(-)
I think you also want to revert 76bf133c in this patch, otherwise 059 fails after applying it.
Kevin
Quoted 8 lines · Kevin Wolf
Am 24.01.2018 um 05:42 hat Fam Zheng geschrieben:
Quoted 7 lines
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.Instead of fixing the output, we fix the image descriptor, because the code path we want to exercise is actually the invalid image size.
Quoted 6 lines
Quoted 4 lines
The binary change is generated along the operations of:
$ bunzip2 afl9.vmdk.bz2 $ qemu-img create -f qcow2 fix.vmdk 1GSure about -f qcow2? :-)
Typo when writing up the commit message, will fix.
Quoted 5 lines
Quoted 5 lines
$ dd if=afl9.vmdk.bz2 of=fix.vmdk bs=512 count=1 conv=notrunc $ mv fix.vmdk afl9.vmdk $ bzip2 afl9.vmdk
Quoted 7 lines
Quoted 4 lines
Signed-off-by Fam Zheng <[email protected]>--- tests/qemu-iotests/sample_images/afl9.vmdk.bz2 | Bin 178 -> 618 bytes 1 file changed, 0 insertions(+), 0 deletions(-)I think you also want to revert
76bf133cin this patch, otherwise 059 fails after applying it.
Yeah, sending another version with that.
Fam