aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-02-02 16:47:51 +0000
committerPeter Maydell <peter.maydell@linaro.org>2021-02-02 16:47:51 +0000
commit77f3804ab7ed94b471a14acb260e5aeacf26193f (patch)
tree5275a7f99aff7db23f1603f8f5fa444d41c796e2 /tests/qemu-iotests
parentcf7ca7d5b9faca13f1f8e3ea92cfb2f741eb0c0e (diff)
parent26513a01741f51650f5dd716681995359794ba6f (diff)
downloadqemu-77f3804ab7ed94b471a14acb260e5aeacf26193f.zip
qemu-77f3804ab7ed94b471a14acb260e5aeacf26193f.tar.gz
qemu-77f3804ab7ed94b471a14acb260e5aeacf26193f.tar.bz2
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block layer patches: - Fix double processing of nodes in bdrv_set_aio_context() - Fix potential hang in block export shutdown - block/nvme: Minor tracing improvements - iotests: Some more fixups for the 'check' rewrite - MAINTAINERS: Add Vladimir as co-maintainer for Block Jobs # gpg: Signature made Tue 02 Feb 2021 16:26:02 GMT # gpg: using RSA key DC3DEB159A9AF95D3D7456FE7F09B272C88F2FD6 # gpg: issuer "kwolf@redhat.com" # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" [full] # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6 * remotes/kevin/tags/for-upstream: block: Fix VM size column width in bdrv_snapshot_dump() block/nvme: Trace NVMe spec version supported by the controller block/nvme: Properly display doorbell stride length in trace event iotests: Fix -makecheck output iotests: check: return 1 on failure iotests: Revert emulator selection to old behaviour iotests/297: pylint: ignore too many statements block: move blk_exp_close_all() to qemu_cleanup() block: Avoid processing BDS twice in bdrv_set_aio_context_ignore() MAINTAINERS: Add Vladimir as co-maintainer for Block Jobs Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests/qemu-iotests')
-rwxr-xr-xtests/qemu-iotests/check5
-rw-r--r--tests/qemu-iotests/pylintrc2
-rw-r--r--tests/qemu-iotests/testenv.py2
-rw-r--r--tests/qemu-iotests/testrunner.py10
4 files changed, 14 insertions, 5 deletions
diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
index 5190dee..d1c87ce 100755
--- a/tests/qemu-iotests/check
+++ b/tests/qemu-iotests/check
@@ -140,4 +140,7 @@ if __name__ == '__main__':
else:
with TestRunner(env, makecheck=args.makecheck,
color=args.color) as tr:
- tr.run_tests([os.path.join(env.source_iotests, t) for t in tests])
+ paths = [os.path.join(env.source_iotests, t) for t in tests]
+ ok = tr.run_tests(paths)
+ if not ok:
+ sys.exit(1)
diff --git a/tests/qemu-iotests/pylintrc b/tests/qemu-iotests/pylintrc
index cd3702e..7a6c0a9 100644
--- a/tests/qemu-iotests/pylintrc
+++ b/tests/qemu-iotests/pylintrc
@@ -21,6 +21,8 @@ disable=invalid-name,
unsubscriptable-object,
# These are temporary, and should be removed:
missing-docstring,
+ too-many-return-statements,
+ too-many-statements
[FORMAT]
diff --git a/tests/qemu-iotests/testenv.py b/tests/qemu-iotests/testenv.py
index b31275f..1fbec85 100644
--- a/tests/qemu-iotests/testenv.py
+++ b/tests/qemu-iotests/testenv.py
@@ -135,7 +135,7 @@ class TestEnv(ContextManager['TestEnv']):
if not os.path.exists(self.qemu_prog):
pattern = root('qemu-system-*')
try:
- progs = glob.iglob(pattern)
+ progs = sorted(glob.iglob(pattern))
self.qemu_prog = next(p for p in progs if isxfile(p))
except StopIteration:
sys.exit("Not found any Qemu executable binary by pattern "
diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunner.py
index 24b3fba..1fc61fc 100644
--- a/tests/qemu-iotests/testrunner.py
+++ b/tests/qemu-iotests/testrunner.py
@@ -301,8 +301,10 @@ class TestRunner(ContextManager['TestRunner']):
last_el = self.last_elapsed.get(test)
start = datetime.datetime.now().strftime('%H:%M:%S')
- self.test_print_one_line(test=test, starttime=start, lasttime=last_el,
- end='\r', test_field_width=test_field_width)
+ if not self.makecheck:
+ self.test_print_one_line(test=test, starttime=start,
+ lasttime=last_el, end='\r',
+ test_field_width=test_field_width)
res = self.do_run_test(test)
@@ -318,7 +320,7 @@ class TestRunner(ContextManager['TestRunner']):
return res
- def run_tests(self, tests: List[str]) -> None:
+ def run_tests(self, tests: List[str]) -> bool:
n_run = 0
failed = []
notrun = []
@@ -363,5 +365,7 @@ class TestRunner(ContextManager['TestRunner']):
if failed:
print('Failures:', ' '.join(failed))
print(f'Failed {len(failed)} of {n_run} iotests')
+ return False
else:
print(f'Passed all {n_run} iotests')
+ return True