mirror_zfs/scripts
Rob Norris f43839e7fd ZTS: fail test run if test runner crashes unexpectedly
zfs-tests.sh executes test-runner.py to do the actual test work. Any
exit code < 4 is interpreted as success, with the actual value
describing the outcome of the tests inside.

If a Python program crashes in some way (eg an uncaught exception), the
process exit code is 1.

Taken together, this means that test-runner.py can crash during setup,
but return a "success" error code to zfs-tests.sh, which will report and
exit 0. This in turn causes the CI runner to believe the test run
completed successfully.

This commit addresses this by making zfs-tests.sh interpret an exit code
of 255 as a failure in the runner itself. Then, in test-runner.py, the
"fail()" function defaults to a 255 return, and the main function gets
wrapped in a generic exception handler, which prints it and calls
fail().

All together, this should mean that any unexpected failure in the test
runner itself will be propagated out of zfs-tests.sh for CI or any other
calling program to deal with.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Closes #17858
2025-11-12 12:57:59 -08:00
..
zfs-images@3331601f6d Add zimport.sh compatibility test script 2014-02-21 12:10:31 -08:00
.gitignore Linux build: handle CONFIG_OBJTOOL_WERROR=y 2025-06-16 08:12:09 -07:00
commitcheck.sh Add ShellCheck's --enable=all inside scripts/ 2022-01-13 11:09:19 -07:00
common.sh.in Ubuntu 22.04 integration: ShellCheck 2022-11-18 11:24:48 -08:00
convert_wycheproof.pl convert_wycheproof: don't check tag len on invalid tests 2025-03-18 17:09:49 -07:00
cstyle.pl SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
dkms.mkconf disable automatic dependency tracking for dkms builds 2024-06-13 18:08:49 -07:00
dkms.postbuild Turn shellcheck into a normal make target. Fix new files it caught 2021-06-01 11:38:49 -07:00
kmodtool SPDX: license tags: MIT 2025-03-13 17:56:54 -07:00
make_gitrev.sh SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
Makefile.am ZTS: Fix zpool_status_features_001_pos local test (#17174) 2025-03-25 10:30:48 -07:00
man-dates.sh Fix minor shellcheck 0.7.2 warnings 2021-06-09 12:21:24 -07:00
mancheck.sh mancheck: allow single files 2025-09-17 16:33:48 -07:00
objtool-wrapper.in Linux build: handle CONFIG_OBJTOOL_WERROR=y 2025-06-16 08:12:09 -07:00
paxcheck.sh Add ShellCheck's --enable=all inside scripts/ 2022-01-13 11:09:19 -07:00
spdxcheck.pl cmd: rename arcstat to zarcstat 2025-09-10 15:01:20 -07:00
update_authors.pl update_authors: output possible mailmap additions 2025-05-13 09:24:03 -07:00
zfs2zol-patch.sed linux: module: weld all but spl.ko into zfs.ko 2022-04-20 13:28:24 -07:00
zfs_prepare_disk Add zfs_prepare_disk script for disk firmware install 2023-09-21 08:36:26 -07:00
zfs-helpers.sh ZTS: Fix stale symlinks with zfs-helpers.sh 2025-09-25 12:07:47 -07:00
zfs-tests-color.sh Colorize the Github test output 2022-02-16 11:40:25 -08:00
zfs-tests.sh ZTS: fail test run if test runner crashes unexpectedly 2025-11-12 12:57:59 -08:00
zfs.sh scripts: zfs.sh: explicitly unload all modules via rmmod 2022-04-21 16:33:12 -07:00
zimport.sh Ubuntu 22.04 integration: ShellCheck 2022-11-18 11:24:48 -08:00
zloop.sh SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zol2zfs-patch.sed Move properties, parameters, events, and concepts around manual sections 2021-06-09 14:35:30 -07:00