|
|
8d419f |
From d924e5c3014a65e059fd414b90893d320e1784bd Mon Sep 17 00:00:00 2001
|
|
|
8d419f |
From: Frantisek Sumsal <frantisek@sumsal.cz>
|
|
|
8d419f |
Date: Thu, 27 Jan 2022 22:51:15 +0100
|
|
|
8d419f |
Subject: [PATCH] test: temporary workaround for #21819
|
|
|
8d419f |
|
|
|
8d419f |
Since the TEST-64-UDEV-STORAGE fails are quite frequent now and the root
|
|
|
8d419f |
cause is yet to be discovered, let's add a kludge that attempts to retry
|
|
|
8d419f |
the test up to two more times in case it fails, so we don't
|
|
|
8d419f |
unnecessarily disturb CIs while the issue is being investigated.
|
|
|
8d419f |
|
|
|
8d419f |
Revert this commit once #21819 is sorted out.
|
|
|
8d419f |
|
|
|
8d419f |
(cherry picked from commit 95e35511bbdb7810c00c2e4a6cbda5b187192f74)
|
|
|
8d419f |
|
|
|
8d419f |
Related: #2017035
|
|
|
8d419f |
---
|
|
|
8d419f |
test/TEST-64-UDEV-STORAGE/test.sh | 11 ++++++++---
|
|
|
8d419f |
1 file changed, 8 insertions(+), 3 deletions(-)
|
|
|
8d419f |
|
|
|
8d419f |
diff --git a/test/TEST-64-UDEV-STORAGE/test.sh b/test/TEST-64-UDEV-STORAGE/test.sh
|
|
|
8d419f |
index 0f26eaafeb..f784e65984 100755
|
|
|
8d419f |
--- a/test/TEST-64-UDEV-STORAGE/test.sh
|
|
|
8d419f |
+++ b/test/TEST-64-UDEV-STORAGE/test.sh
|
|
|
8d419f |
@@ -119,7 +119,6 @@ test_run() {
|
|
|
8d419f |
|
|
|
8d419f |
# Execute each currently defined function starting with "testcase_"
|
|
|
8d419f |
for testcase in "${TESTCASES[@]}"; do
|
|
|
8d419f |
- _image_cleanup
|
|
|
8d419f |
echo "------ $testcase: BEGIN ------"
|
|
|
8d419f |
# Note for my future frustrated self: `fun && xxx` (as well as ||, if, while,
|
|
|
8d419f |
# until, etc.) _DISABLES_ the `set -e` behavior in _ALL_ nested function
|
|
|
8d419f |
@@ -130,8 +129,14 @@ test_run() {
|
|
|
8d419f |
# So, be careful when adding clean up snippets in the testcase_*() functions -
|
|
|
8d419f |
# if the `test_run_one()` function isn't the last command, you have propagate
|
|
|
8d419f |
# the exit code correctly (e.g. `test_run_one() || return $?`, see below).
|
|
|
8d419f |
- ec=0
|
|
|
8d419f |
- "$testcase" "$test_id" || ec=$?
|
|
|
8d419f |
+
|
|
|
8d419f |
+ # FIXME: temporary workaround for intermittent fails in certain tests
|
|
|
8d419f |
+ # See: https://github.com/systemd/systemd/issues/21819
|
|
|
8d419f |
+ for ((_i = 0; _i < 3; _i++)); do
|
|
|
8d419f |
+ _image_cleanup
|
|
|
8d419f |
+ ec=0
|
|
|
8d419f |
+ "$testcase" "$test_id" && break || ec=$?
|
|
|
8d419f |
+ done
|
|
|
8d419f |
case $ec in
|
|
|
8d419f |
0)
|
|
|
8d419f |
passed+=("$testcase")
|