From 6a7014ef22ad3cf9110ca0e178f73a67a6483e00 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Date: Mon, 10 Sep 2018 12:29:23 +0300 Subject: qemu-iotests: Test snapshot=on with nonexistent TMPDIR 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 Signed-off-by: Kevin Wolf --- tests/qemu-iotests/051 | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/qemu-iotests/051') diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051 index ee9c820d0f..25d3b2d478 100755 --- a/tests/qemu-iotests/051 +++ b/tests/qemu-iotests/051 @@ -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 -- cgit v1.2.3