Blame SOURCES/kvm-iotest-Fix-241-to-run-in-generic-directory.patch

7711c0
From 295b60369a025fd61f3abe3e6edbd2b298ba8314 Mon Sep 17 00:00:00 2001
7711c0
From: John Snow <jsnow@redhat.com>
7711c0
Date: Mon, 6 May 2019 17:56:29 +0200
7711c0
Subject: [PATCH 19/53] iotest: Fix 241 to run in generic directory
7711c0
7711c0
RH-Author: John Snow <jsnow@redhat.com>
7711c0
Message-id: <20190506175629.11079-20-jsnow@redhat.com>
7711c0
Patchwork-id: 87200
7711c0
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH 19/19] iotest: Fix 241 to run in generic directory
7711c0
Bugzilla: 1692018
7711c0
RH-Acked-by: Max Reitz <mreitz@redhat.com>
7711c0
RH-Acked-by: Stefano Garzarella <sgarzare@redhat.com>
7711c0
RH-Acked-by: Thomas Huth <thuth@redhat.com>
7711c0
7711c0
From: Eric Blake <eblake@redhat.com>
7711c0
7711c0
Filter the qemu-nbd server output to get rid of a direct reference
7711c0
to my build directory.
7711c0
7711c0
Fixes: e9dce9cb
7711c0
Reported-by: Max Reitz <mreitz@redhat.com>
7711c0
Signed-off-by: Eric Blake <eblake@redhat.com>
7711c0
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
7711c0
(cherry picked from commit 9749636b005d118259810afb92482df2fe0ae2ad)
7711c0
Signed-off-by: John Snow <jsnow@redhat.com>
7711c0
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
7711c0
---
7711c0
 tests/qemu-iotests/241     | 4 +++-
7711c0
 tests/qemu-iotests/241.out | 6 +++---
7711c0
 2 files changed, 6 insertions(+), 4 deletions(-)
7711c0
7711c0
diff --git a/tests/qemu-iotests/241 b/tests/qemu-iotests/241
7711c0
index 4b19685..017a736 100755
7711c0
--- a/tests/qemu-iotests/241
7711c0
+++ b/tests/qemu-iotests/241
7711c0
@@ -28,6 +28,7 @@ nbd_unix_socket=$TEST_DIR/test_qemu_nbd_socket
7711c0
 _cleanup()
7711c0
 {
7711c0
     _cleanup_test_img
7711c0
+    rm -f "$TEST_DIR/server.log"
7711c0
     nbd_server_stop
7711c0
 }
7711c0
 trap "_cleanup; exit \$status" 0 1 2 3 15
7711c0
@@ -69,12 +70,13 @@ echo
7711c0
 
7711c0
 # Intentionally omit '-f' to force image probing, which in turn forces
7711c0
 # sector alignment, here at the server.
7711c0
-nbd_server_start_unix_socket "$TEST_IMG_FILE"
7711c0
+nbd_server_start_unix_socket "$TEST_IMG_FILE" 2> "$TEST_DIR/server.log"
7711c0
 
7711c0
 $QEMU_NBD_PROG --list -k $nbd_unix_socket | grep '\(size\|min\)'
7711c0
 $QEMU_IMG map -f raw --output=json "$TEST_IMG" | _filter_qemu_img_map
7711c0
 $QEMU_IO -f raw -c map "$TEST_IMG"
7711c0
 nbd_server_stop
7711c0
+cat "$TEST_DIR/server.log" | _filter_testdir
7711c0
 
7711c0
 echo
7711c0
 echo "=== Exporting unaligned raw image, forced client sector alignment ==="
7711c0
diff --git a/tests/qemu-iotests/241.out b/tests/qemu-iotests/241.out
7711c0
index f481074..75f9f46 100644
7711c0
--- a/tests/qemu-iotests/241.out
7711c0
+++ b/tests/qemu-iotests/241.out
7711c0
@@ -10,13 +10,13 @@ QA output created by 241
7711c0
 
7711c0
 === Exporting unaligned raw image, forced server sector alignment ===
7711c0
 
7711c0
-WARNING: Image format was not specified for '/home/eblake/qemu/tests/qemu-iotests/scratch/t.raw' and probing guessed raw.
7711c0
-         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
7711c0
-         Specify the 'raw' format explicitly to remove the restrictions.
7711c0
   size:  1024
7711c0
   min block: 512
7711c0
 [{ "start": 0, "length": 1024, "depth": 0, "zero": false, "data": true, "offset": OFFSET}]
7711c0
 1 KiB (0x400) bytes     allocated at offset 0 bytes (0x0)
7711c0
+WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed raw.
7711c0
+         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
7711c0
+         Specify the 'raw' format explicitly to remove the restrictions.
7711c0
 
7711c0
 === Exporting unaligned raw image, forced client sector alignment ===
7711c0
 
7711c0
-- 
7711c0
1.8.3.1
7711c0