|
|
9bac43 |
From d13b20d0650519722da79a9cb9e4e0a1f2bee26c Mon Sep 17 00:00:00 2001
|
|
|
9bac43 |
From: Kevin Wolf <kwolf@redhat.com>
|
|
|
9bac43 |
Date: Mon, 4 Dec 2017 12:10:07 +0100
|
|
|
9bac43 |
Subject: [PATCH 36/36] iotests: Fix 195 if IMGFMT is part of TEST_DIR
|
|
|
9bac43 |
|
|
|
9bac43 |
RH-Author: Kevin Wolf <kwolf@redhat.com>
|
|
|
9bac43 |
Message-id: <20171204121007.12964-9-kwolf@redhat.com>
|
|
|
9bac43 |
Patchwork-id: 78108
|
|
|
9bac43 |
O-Subject: [RHV-7.5 qemu-kvm-rhev PATCH v2 8/8] iotests: Fix 195 if IMGFMT is part of TEST_DIR
|
|
|
9bac43 |
Bugzilla: 1492178
|
|
|
9bac43 |
RH-Acked-by: Fam Zheng <famz@redhat.com>
|
|
|
9bac43 |
RH-Acked-by: Max Reitz <mreitz@redhat.com>
|
|
|
9bac43 |
RH-Acked-by: Jeffrey Cody <jcody@redhat.com>
|
|
|
9bac43 |
|
|
|
9bac43 |
From: Max Reitz <mreitz@redhat.com>
|
|
|
9bac43 |
|
|
|
9bac43 |
do_run_qemu() in iotest 195 first applies _filter_imgfmt when printing
|
|
|
9bac43 |
qemu's command line and _filter_testdir only afterwards. Therefore, if
|
|
|
9bac43 |
the image format is part of the test directory path, _filter_testdir
|
|
|
9bac43 |
will no longer apply and the actual output will differ from the
|
|
|
9bac43 |
reference output even in case of success.
|
|
|
9bac43 |
|
|
|
9bac43 |
For example, TEST_DIR might be "/tmp/test-qcow2", in which case
|
|
|
9bac43 |
_filter_imgfmt first transforms this to "/tmp/test-IMGFMT" which is no
|
|
|
9bac43 |
longer recognized as the TEST_DIR by _filter_testdir.
|
|
|
9bac43 |
|
|
|
9bac43 |
Fix this by not applying _filter_imgfmt in do_run_qemu() but in
|
|
|
9bac43 |
run_qemu() instead, and only after _filter_testdir.
|
|
|
9bac43 |
|
|
|
9bac43 |
Signed-off-by: Max Reitz <mreitz@redhat.com>
|
|
|
9bac43 |
Message-id: 20170927211334.3988-1-mreitz@redhat.com
|
|
|
9bac43 |
Reviewed-by: Eric Blake <eblake@redhat.com>
|
|
|
9bac43 |
Signed-off-by: Max Reitz <mreitz@redhat.com>
|
|
|
9bac43 |
(cherry picked from commit 47500c6775813c8f2b5a5de04d84222f3cecc62d)
|
|
|
9bac43 |
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
9bac43 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9bac43 |
---
|
|
|
9bac43 |
tests/qemu-iotests/195 | 7 ++++---
|
|
|
9bac43 |
1 file changed, 4 insertions(+), 3 deletions(-)
|
|
|
9bac43 |
|
|
|
9bac43 |
diff --git a/tests/qemu-iotests/195 b/tests/qemu-iotests/195
|
|
|
9bac43 |
index 05a239c..e7a403d 100644
|
|
|
9bac43 |
--- a/tests/qemu-iotests/195
|
|
|
9bac43 |
+++ b/tests/qemu-iotests/195
|
|
|
9bac43 |
@@ -44,15 +44,16 @@ _supported_os Linux
|
|
|
9bac43 |
|
|
|
9bac43 |
function do_run_qemu()
|
|
|
9bac43 |
{
|
|
|
9bac43 |
- echo Testing: "$@" | _filter_imgfmt
|
|
|
9bac43 |
+ echo Testing: "$@"
|
|
|
9bac43 |
$QEMU -nographic -qmp-pretty stdio -serial none "$@"
|
|
|
9bac43 |
echo
|
|
|
9bac43 |
}
|
|
|
9bac43 |
|
|
|
9bac43 |
function run_qemu()
|
|
|
9bac43 |
{
|
|
|
9bac43 |
- do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_qemu | _filter_qmp \
|
|
|
9bac43 |
- | _filter_qemu_io | _filter_generated_node_ids
|
|
|
9bac43 |
+ do_run_qemu "$@" 2>&1 | _filter_testdir | _filter_imgfmt | _filter_qemu \
|
|
|
9bac43 |
+ | _filter_qmp | _filter_qemu_io \
|
|
|
9bac43 |
+ | _filter_generated_node_ids
|
|
|
9bac43 |
}
|
|
|
9bac43 |
|
|
|
9bac43 |
size=64M
|
|
|
9bac43 |
--
|
|
|
9bac43 |
1.8.3.1
|
|
|
9bac43 |
|