iotest 134: test cluster-misaligned encrypted write
PATCH v2 1/1 iotest 134: test cluster-misaligned encrypted write
COW (even empty/zero) areas require encryption too
Signed-off-by Anton Nefedov <[email protected]>
Reviewed-by Eric Blake <[email protected]>
Reviewed-by Max Reitz <[email protected]>
Reviewed-by Alberto Garcia <[email protected]>
---
..apparently v1 ended up in a weird base64 that would not easily git-am. Resending.
used to be a part of 'qcow2: cluster space preallocation' series
http://lists.nongnu.org/archive/html/qemu-devel/2019-01/msg02769.html
--- tests/qemu-iotests/134 | 9 +++++++++ tests/qemu-iotests/134.out | 10 ++++++++++ 2 files changed, 19 insertions(+)
tests/qemu-iotests/134 +9 -0
@@ -57,6 +57,15 @@ echo echo "== reading whole image ==" $QEMU_IO --object $SECRET -c "read 0 $size" --image-opts $IMGSPEC | _filter_qemu_io | _filter_testdir +echo +echo "== rewriting cluster part ==" +$QEMU_IO --object $SECRET -c "write -P 0xb 512 512" --image-opts $IMGSPEC | _filter_qemu_io | _filter_testdir + +echo +echo "== verify pattern ==" +$QEMU_IO --object $SECRET -c "read -P 0 0 512" --image-opts $IMGSPEC | _filter_qemu_io | _filter_testdir +$QEMU_IO --object $SECRET -c "read -P 0xb 512 512" --image-opts $IMGSPEC | _filter_qemu_io | _filter_testdir + echo echo "== rewriting whole image ==" $QEMU_IO --object $SECRET -c "write -P 0xa 0 $size" --image-opts $IMGSPEC | _filter_qemu_io | _filter_testdir
tests/qemu-iotests/134.out +10 -0
@@ -5,6 +5,16 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 encryption=on encrypt. read 134217728/134217728 bytes at offset 0 128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +== rewriting cluster part == +wrote 512/512 bytes at offset 512 +512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) + +== verify pattern == +read 512/512 bytes at offset 0 +512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +read 512/512 bytes at offset 512 +512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) + == rewriting whole image == wrote 134217728/134217728 bytes at offset 0 128 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Signature · 1 line
2.17.1
Max Reitz
AppliedQuoted 11 lines · Anton Nefedov
COW (even empty/zero) areas require encryption too
Signed-off-by Anton Nefedov <[email protected]>Reviewed-by Eric Blake <[email protected]>Reviewed-by Max Reitz <[email protected]>Reviewed-by Alberto Garcia <[email protected]>---
..apparently v1 ended up in a weird base64 that would not easily git-am. Resending.
Quoted 8 lines
used to be a part of 'qcow2: cluster space preallocation' series
http://lists.nongnu.org/archive/html/qemu-devel/2019-01/msg02769.html--- tests/qemu-iotests/134 | 9 +++++++++ tests/qemu-iotests/134.out | 10 ++++++++++ 2 files changed, 19 insertions(+)
Thanks, applied to my block branch:
https://git.xanclic.moe/XanClic/qemu/commits/branch/block
Max