[PATCH stalld 33/36] tests/functional: Accept FIFO fallback in test_fifo_boosting

Wander Lairson Costa <[email protected]> Mon, 30 Mar 2026 16:43:56 -0300
Newsgroups org.kernel.vger.linux-rt-users
Message-ID <[email protected]>
Test 5 expects stalld to exit when given -F without -A, but stalld
prints a warning and falls back to adaptive mode instead. The test
had contradictory results: a FAIL for not exiting and a PASS for
finding the warning message. Accept the fallback as valid behavior
and only fail if stalld silently ignores the incompatibility.

Signed-off-by: Wander Lairson Costa <[email protected]>
---
 tests/functional/test_fifo_boosting.sh | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/tests/functional/test_fifo_boosting.sh b/tests/functional/test_fifo_boosting.sh
index 50c8d14..a003deb 100755
--- a/tests/functional/test_fifo_boosting.sh
+++ b/tests/functional/test_fifo_boosting.sh
@@ -332,20 +332,11 @@ timeout 5 ${TEST_ROOT}/../stalld -f -v -F -t 5 -c ${TEST_CPU} > "${STALLD_LOG_FA
 ret=$?
 
 if [ $ret -ne 0 ] && [ $ret -ne 124 ]; then
-    pass "stalld exited as expected"
+    pass "stalld rejected FIFO in single-threaded mode"
+elif grep -qiE "single.*thread|falling back|adaptive" "${STALLD_LOG_FAIL}"; then
+    pass "stalld detected incompatibility and fell back to adaptive mode"
 else
-    fail "stalld did not reject FIFO in single-threaded mode"
-fi
-
-# Check for error message in log
-if grep -qiE "single.*thread.*fifo|fifo.*single.*thread|can.*only.*deadline" "${STALLD_LOG_FAIL}"; then
-    pass "Error message about FIFO+single-threaded incompatibility found"
-else
-    log "ℹ INFO: Checking exit status or error messages..."
-    if [ -s "${STALLD_LOG_FAIL}" ]; then
-        log "Log contents:"
-        cat "${STALLD_LOG_FAIL}"
-    fi
+    fail "stalld silently accepted FIFO in single-threaded mode"
 fi
 
 #=============================================================================
-- 
2.53.0