Blame SOURCES/kvm-qemu-iotests-Test-snapshot-on-with-nonexistent-TMPDI.patch

7711c0
From f7de511ab11650d017d75a73a3492fe964ec3f95 Mon Sep 17 00:00:00 2001
7711c0
From: Kevin Wolf <kwolf@redhat.com>
7711c0
Date: Fri, 15 Mar 2019 18:10:03 +0100
7711c0
Subject: [PATCH 007/163] qemu-iotests: Test snapshot=on with nonexistent
7711c0
 TMPDIR
7711c0
7711c0
RH-Author: Kevin Wolf <kwolf@redhat.com>
7711c0
Message-id: <20190315181010.14964-8-kwolf@redhat.com>
7711c0
Patchwork-id: 84884
7711c0
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH 07/14] qemu-iotests: Test snapshot=on with nonexistent TMPDIR
7711c0
Bugzilla: 1685989
7711c0
RH-Acked-by: John Snow <jsnow@redhat.com>
7711c0
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
7711c0
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
7711c0
7711c0
From: Alberto Garcia <berto@igalia.com>
7711c0
7711c0
We just fixed a bug that was causing a use-after-free when QEMU was
7711c0
unable to create a temporary snapshot. This is a test case for this
7711c0
scenario.
7711c0
7711c0
Signed-off-by: Alberto Garcia <berto@igalia.com>
7711c0
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
7711c0
(cherry picked from commit 6a7014ef22ad3cf9110ca0e178f73a67a6483e00)
7711c0
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
7711c0
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
7711c0
---
7711c0
 tests/qemu-iotests/051        | 3 +++
7711c0
 tests/qemu-iotests/051.out    | 3 +++
7711c0
 tests/qemu-iotests/051.pc.out | 3 +++
7711c0
 3 files changed, 9 insertions(+)
7711c0
7711c0
diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051
7711c0
index c5cc0ee..4899f84 100755
7711c0
--- a/tests/qemu-iotests/051
7711c0
+++ b/tests/qemu-iotests/051
7711c0
@@ -354,6 +354,9 @@ printf %b "qemu-io $device_id \"write -P 0x33 0 4k\"\ncommit $device_id\n" |
7711c0
 
7711c0
 $QEMU_IO -c "read -P 0x33 0 4k" "$TEST_IMG" | _filter_qemu_io
7711c0
 
7711c0
+# Using snapshot=on with a non-existent TMPDIR
7711c0
+TMPDIR=/nonexistent run_qemu -drive driver=null-co,snapshot=on
7711c0
+
7711c0
 # success, all done
7711c0
 echo "*** done"
7711c0
 rm -f $seq.full
7711c0
diff --git a/tests/qemu-iotests/051.out b/tests/qemu-iotests/051.out
7711c0
index b727350..793af2a 100644
7711c0
--- a/tests/qemu-iotests/051.out
7711c0
+++ b/tests/qemu-iotests/051.out
7711c0
@@ -455,4 +455,7 @@ wrote 4096/4096 bytes at offset 0
7711c0
 
7711c0
 read 4096/4096 bytes at offset 0
7711c0
 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
7711c0
+Testing: -drive driver=null-co,snapshot=on
7711c0
+QEMU_PROG: -drive driver=null-co,snapshot=on: Could not get temporary filename: No such file or directory
7711c0
+
7711c0
 *** done
7711c0
diff --git a/tests/qemu-iotests/051.pc.out b/tests/qemu-iotests/051.pc.out
7711c0
index e9257fe..ca64eda 100644
7711c0
--- a/tests/qemu-iotests/051.pc.out
7711c0
+++ b/tests/qemu-iotests/051.pc.out
7711c0
@@ -527,4 +527,7 @@ wrote 4096/4096 bytes at offset 0
7711c0
 
7711c0
 read 4096/4096 bytes at offset 0
7711c0
 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
7711c0
+Testing: -drive driver=null-co,snapshot=on
7711c0
+QEMU_PROG: -drive driver=null-co,snapshot=on: Could not get temporary filename: No such file or directory
7711c0
+
7711c0
 *** done
7711c0
-- 
7711c0
1.8.3.1
7711c0