summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorFrantisek Sumsal <frantisek@sumsal.cz>2022-01-27 22:51:15 +0100
committerFrantisek Sumsal <frantisek@sumsal.cz>2022-01-27 22:51:15 +0100
commit95e35511bbdb7810c00c2e4a6cbda5b187192f74 (patch)
tree22d09896f1bc5b715f615828b1e4a3001e811ba7 /test
parenttest: don't leak local variable to outer scopes (diff)
downloadsystemd-95e35511bbdb7810c00c2e4a6cbda5b187192f74.tar.xz
systemd-95e35511bbdb7810c00c2e4a6cbda5b187192f74.zip
test: temporary workaround for #21819
Since the TEST-64-UDEV-STORAGE fails are quite frequent now and the root cause is yet to be discovered, let's add a kludge that attempts to retry the test up to two more times in case it fails, so we don't unnecessarily disturb CIs while the issue is being investigated. Revert this commit once #21819 is sorted out.
Diffstat (limited to 'test')
-rwxr-xr-xtest/TEST-64-UDEV-STORAGE/test.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/TEST-64-UDEV-STORAGE/test.sh b/test/TEST-64-UDEV-STORAGE/test.sh
index 04632952d0..c360c8b661 100755
--- a/test/TEST-64-UDEV-STORAGE/test.sh
+++ b/test/TEST-64-UDEV-STORAGE/test.sh
@@ -119,7 +119,6 @@ test_run() {
# Execute each currently defined function starting with "testcase_"
for testcase in "${TESTCASES[@]}"; do
- _image_cleanup
echo "------ $testcase: BEGIN ------"
# Note for my future frustrated self: `fun && xxx` (as well as ||, if, while,
# until, etc.) _DISABLES_ the `set -e` behavior in _ALL_ nested function
@@ -130,8 +129,14 @@ test_run() {
# So, be careful when adding clean up snippets in the testcase_*() functions -
# if the `test_run_one()` function isn't the last command, you have propagate
# the exit code correctly (e.g. `test_run_one() || return $?`, see below).
- ec=0
- "$testcase" "$test_id" || ec=$?
+
+ # FIXME: temporary workaround for intermittent fails in certain tests
+ # See: https://github.com/systemd/systemd/issues/21819
+ for ((_i = 0; _i < 3; _i++)); do
+ _image_cleanup
+ ec=0
+ "$testcase" "$test_id" && break || ec=$?
+ done
case $ec in
0)
passed+=("$testcase")