]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
qemu-iotests: Test snapshot=on with nonexistent TMPDIR
authorAlberto Garcia <berto@igalia.com>
Mon, 10 Sep 2018 09:29:23 +0000 (12:29 +0300)
committerKevin Wolf <kwolf@redhat.com>
Tue, 25 Sep 2018 13:50:15 +0000 (15:50 +0200)
We just fixed a bug that was causing a use-after-free when QEMU was
unable to create a temporary snapshot. This is a test case for this
scenario.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/051
tests/qemu-iotests/051.out
tests/qemu-iotests/051.pc.out

index ee9c820d0f8e37e851e716130b11ed1b051b4418..25d3b2d478572c963f3f1baf82034969d2c4b09a 100755 (executable)
@@ -354,6 +354,9 @@ printf %b "qemu-io $device_id \"write -P 0x33 0 4k\"\ncommit $device_id\n" |
 
 $QEMU_IO -c "read -P 0x33 0 4k" "$TEST_IMG" | _filter_qemu_io
 
+# Using snapshot=on with a non-existent TMPDIR
+TMPDIR=/nonexistent run_qemu -drive driver=null-co,snapshot=on
+
 # success, all done
 echo "*** done"
 rm -f $seq.full
index b7273505c7fe98e1a810c1f005c5cafea4a09e96..793af2ab96796e8d38f86ac525dda0b8c06a5bd4 100644 (file)
@@ -455,4 +455,7 @@ wrote 4096/4096 bytes at offset 0
 
 read 4096/4096 bytes at offset 0
 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+Testing: -drive driver=null-co,snapshot=on
+QEMU_PROG: -drive driver=null-co,snapshot=on: Could not get temporary filename: No such file or directory
+
 *** done
index e9257fe3189d46d7414db08c3f0c6883adc22bba..ca64edae6a6b70a7c9ebd68a3b0efc77be377cf5 100644 (file)
@@ -527,4 +527,7 @@ wrote 4096/4096 bytes at offset 0
 
 read 4096/4096 bytes at offset 0
 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+Testing: -drive driver=null-co,snapshot=on
+QEMU_PROG: -drive driver=null-co,snapshot=on: Could not get temporary filename: No such file or directory
+
 *** done