Skip to contentSkip to conversation

iotests: Fix CID for VMDK afl image

PATCH In review Fam Zheng 2 participants 3 messages Jan 24, 2018 – Jan 30, 2018

lore
Share & tools
lore

Fam Zheng

author
#0 lore raw

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
index 03615d36a12425cf4240bab86f4cfe648db14572..9fcd0af45a815431acf4689e0845ecf2d333cd58 100644
GIT binary patch
Signature · 1 line
2.14.3
#1 lore raw

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 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

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.vmdk
---
 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

author
#2 lore raw
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 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.

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 1G

Sure 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
---
 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.

Yeah, sending another version with that.

Fam