* [PATCH v2] run-fio-tests: make test runs more resilient
[not found] <CGME20210921212712uscas1p2aa572cf95c6782ee69be4dac7beb8f50@uscas1p2.samsung.com>
@ 2021-09-21 21:27 ` Vincent Fu
2021-10-17 13:23 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Vincent Fu @ 2021-09-21 21:27 UTC (permalink / raw)
To: axboe, fio; +Cc: Vincent Fu
Catch exceptions that occur during test setup/running/evaluation. This
makes it more likely that the entire test suite can run to completion
even if some tests fail in an unexpected fashion.
In particular I have seen failures in FioJobTest_t0014() when the test
is run on a bare metal machine. Without this patch these failures make
the entire script grind to a halt.
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
---
t/run-fio-tests.py | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/t/run-fio-tests.py b/t/run-fio-tests.py
index a59cdfe0..612e50ca 100755
--- a/t/run-fio-tests.py
+++ b/t/run-fio-tests.py
@@ -49,6 +49,7 @@ import shutil
import logging
import argparse
import platform
+import traceback
import subprocess
import multiprocessing
from pathlib import Path
@@ -1057,9 +1058,16 @@ def main():
skipped = skipped + 1
continue
- test.setup(artifact_root, config['test_id'])
- test.run()
- test.check_result()
+ try:
+ test.setup(artifact_root, config['test_id'])
+ test.run()
+ test.check_result()
+ except KeyboardInterrupt:
+ break
+ except Exception as e:
+ test.passed = False
+ test.failure_reason += str(e)
+ logging.debug("Test %d exception:\n%s\n", config['test_id'], traceback.format_exc())
if test.passed:
result = "PASSED"
passed = passed + 1
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] run-fio-tests: make test runs more resilient
2021-09-21 21:27 ` [PATCH v2] run-fio-tests: make test runs more resilient Vincent Fu
@ 2021-10-17 13:23 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2021-10-17 13:23 UTC (permalink / raw)
To: fio, Vincent Fu; +Cc: Jens Axboe
On Tue, 21 Sep 2021 21:27:11 +0000, Vincent Fu wrote:
> Catch exceptions that occur during test setup/running/evaluation. This
> makes it more likely that the entire test suite can run to completion
> even if some tests fail in an unexpected fashion.
>
> In particular I have seen failures in FioJobTest_t0014() when the test
> is run on a bare metal machine. Without this patch these failures make
> the entire script grind to a halt.
>
> [...]
Applied, thanks!
[1/1] run-fio-tests: make test runs more resilient
commit: aa9f26276e1961fab2d33e188f5a2432360c9c14
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-17 13:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20210921212712uscas1p2aa572cf95c6782ee69be4dac7beb8f50@uscas1p2.samsung.com>
2021-09-21 21:27 ` [PATCH v2] run-fio-tests: make test runs more resilient Vincent Fu
2021-10-17 13:23 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).