aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/241.out
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2019-03-28 23:27:45 -0500
committerEric Blake <eblake@redhat.com>2019-03-30 20:50:58 -0500
commite9dce9cb6eae57834cd80324ff43069299198bab (patch)
tree34ab01ee5e7aacc051c114d0203e92c9cf724baf /tests/qemu-iotests/241.out
parent737d3f524481bb2ef68d3eba1caa636ff143e16a (diff)
downloadqemu-e9dce9cb6eae57834cd80324ff43069299198bab.zip
qemu-e9dce9cb6eae57834cd80324ff43069299198bab.tar.gz
qemu-e9dce9cb6eae57834cd80324ff43069299198bab.tar.bz2
iotests: Add 241 to test NBD on unaligned images
Add a test for the NBD client workaround in the previous patch. It's not really feasible for an iotest to assume a specific tracing engine, so we can't really probe trace_nbd_parse_blockstatus_compliance to see if the server was fixed vs. whether the client just worked around the server (other than by rearranging order between code patches and this test). But having a successful exchange sure beats the previous state of an error message. Since format probing can change alignment, we can use that as an easy way to test several configurations. Not tested yet, but worth adding to this test in future patches: an NBD server that can advertise a non-sector-aligned size (such as nbdkit) causes qemu as the NBD client to misbehave when it rounds the size up and accesses beyond the advertised size. Qemu as NBD server never advertises a non-sector-aligned size (since bdrv_getlength() currently rounds up to sector boundaries); until qemu can act as such a server, testing that flaw will have to rely on external binaries. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <20190329042750.14704-2-eblake@redhat.com> Tested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> [eblake: add forced-512 alignment, and nbdkit reproducer comment]
Diffstat (limited to 'tests/qemu-iotests/241.out')
-rw-r--r--tests/qemu-iotests/241.out26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/qemu-iotests/241.out b/tests/qemu-iotests/241.out
new file mode 100644
index 0000000..b76a623
--- /dev/null
+++ b/tests/qemu-iotests/241.out
@@ -0,0 +1,26 @@
+QA output created by 241
+
+=== Exporting unaligned raw image, natural alignment ===
+
+ size: 1024
+ min block: 512
+[{ "start": 0, "length": 1024, "depth": 0, "zero": false, "data": true}]
+1 KiB (0x400) bytes allocated at offset 0 bytes (0x0)
+
+=== Exporting unaligned raw image, forced server sector alignment ===
+
+WARNING: Image format was not specified for '/home/eblake/qemu/tests/qemu-iotests/scratch/t.raw' and probing guessed raw.
+ Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
+ Specify the 'raw' format explicitly to remove the restrictions.
+ size: 1024
+ min block: 512
+[{ "start": 0, "length": 1024, "depth": 0, "zero": false, "data": true}]
+1 KiB (0x400) bytes allocated at offset 0 bytes (0x0)
+
+=== Exporting unaligned raw image, forced client sector alignment ===
+
+ size: 1024
+ min block: 512
+[{ "start": 0, "length": 1024, "depth": 0, "zero": false, "data": true}]
+1 KiB (0x400) bytes allocated at offset 0 bytes (0x0)
+*** done