summaryrefslogtreecommitdiffstats
path: root/tests/qemu-iotests/testrunner.py
diff options
context:
space:
mode:
authorPeter Maydell2022-03-07 18:14:09 +0100
committerPeter Maydell2022-03-07 18:14:09 +0100
commitb49872aa8fc0f3f5a3036cc37aa2cb5c92866f33 (patch)
treecf90cae300466316659e0287db1800745bfa867a /tests/qemu-iotests/testrunner.py
parentMerge remote-tracking branch 'remotes/legoater/tags/pull-ppc-20220305' into s... (diff)
parentiotests/image-fleecing: test push backup with fleecing (diff)
downloadqemu-b49872aa8fc0f3f5a3036cc37aa2cb5c92866f33.tar.gz
qemu-b49872aa8fc0f3f5a3036cc37aa2cb5c92866f33.tar.xz
qemu-b49872aa8fc0f3f5a3036cc37aa2cb5c92866f33.zip
Merge remote-tracking branch 'remotes/hreitz-gitlab/tags/pull-block-2022-03-07' into staging
Block patches for 7.0-rc0: - New fleecing backup scheme - iotest fixes - Fixes for the curl block driver - Fix for the preallocate block driver - IDE fix for zero-length TRIM requests # gpg: Signature made Mon 07 Mar 2022 10:33:31 GMT # gpg: using RSA key CB62D7A0EE3829E45F004D34A1FA40D098019CDF # gpg: issuer "hreitz@redhat.com" # gpg: Good signature from "Hanna Reitz <hreitz@redhat.com>" [marginal] # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: CB62 D7A0 EE38 29E4 5F00 4D34 A1FA 40D0 9801 9CDF * remotes/hreitz-gitlab/tags/pull-block-2022-03-07: (23 commits) iotests/image-fleecing: test push backup with fleecing iotests/image-fleecing: add test case with bitmap iotests.py: add qemu_io_pipe_and_status() iotests/image-fleecing: add test-case for fleecing format node block: copy-before-write: realize snapshot-access API block: introduce snapshot-access block driver block/io: introduce block driver snapshot-access API block/reqlist: add reqlist_wait_all() block/dirty-bitmap: introduce bdrv_dirty_bitmap_status() block/reqlist: reqlist_find_conflict(): use ranges_overlap() block: intoduce reqlist block/block-copy: add block_copy_reset() block/copy-before-write: add bitmap open parameter block/block-copy: block_copy_state_new(): add bitmap parameter block/dirty-bitmap: bdrv_merge_dirty_bitmap(): add return value block/block-copy: move copy_bitmap initialization to block_copy_state_new() iotests: Write test output to TEST_DIR tests/qemu-iotests/testrunner: Quote "case not run" lines in TAP mode tests/qemu-iotests/040: Skip TestCommitWithFilters without 'throttle' block: fix preallocate filter: don't do unaligned preallocate requests ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests/qemu-iotests/testrunner.py')
-rw-r--r--tests/qemu-iotests/testrunner.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunner.py
index 9a94273975..41083ff9c6 100644
--- a/tests/qemu-iotests/testrunner.py
+++ b/tests/qemu-iotests/testrunner.py
@@ -259,9 +259,6 @@ class TestRunner(ContextManager['TestRunner']):
"""
f_test = Path(test)
- f_bad = Path(f_test.name + '.out.bad')
- f_notrun = Path(f_test.name + '.notrun')
- f_casenotrun = Path(f_test.name + '.casenotrun')
f_reference = Path(self.find_reference(test))
if not f_test.exists():
@@ -276,9 +273,6 @@ class TestRunner(ContextManager['TestRunner']):
description='No qualified output '
f'(expected {f_reference})')
- for p in (f_bad, f_notrun, f_casenotrun):
- silent_unlink(p)
-
args = [str(f_test.resolve())]
env = self.env.prepare_subprocess(args)
if mp:
@@ -288,6 +282,14 @@ class TestRunner(ContextManager['TestRunner']):
env[d] = os.path.join(env[d], f_test.name)
Path(env[d]).mkdir(parents=True, exist_ok=True)
+ test_dir = env['TEST_DIR']
+ f_bad = Path(test_dir, f_test.name + '.out.bad')
+ f_notrun = Path(test_dir, f_test.name + '.notrun')
+ f_casenotrun = Path(test_dir, f_test.name + '.casenotrun')
+
+ for p in (f_notrun, f_casenotrun):
+ silent_unlink(p)
+
t0 = time.time()
with f_bad.open('w', encoding="utf-8") as f:
with subprocess.Popen(args, cwd=str(f_test.parent), env=env,
@@ -365,7 +367,10 @@ class TestRunner(ContextManager['TestRunner']):
description=res.description)
if res.casenotrun:
- print(res.casenotrun)
+ if self.tap:
+ print('#' + res.casenotrun.replace('\n', '\n#'))
+ else:
+ print(res.casenotrun)
return res