[PATCH stalld 34/36] tests/functional: Fix readiness detection and FIFO fallback in test_force_fifo

Wander Lairson Costa <[email protected]> Mon, 30 Mar 2026 16:43:57 -0300
Newsgroups org.kernel.vger.linux-rt-users
Message-ID <[email protected]>
Add "skipping" to the wait_for_stalld_ready() pattern to handle
aggressive mode with idle detection, where stalld prints "skipping
next phase" instead of "checking cpu" or "waiting tasks". Also
accept stalld's fallback to adaptive mode when given -F without -A,
matching the fix already applied to test_fifo_boosting.

Signed-off-by: Wander Lairson Costa <[email protected]>
---
 tests/functional/test_force_fifo.sh | 4 +++-
 tests/helpers/test_helpers.sh       | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/functional/test_force_fifo.sh b/tests/functional/test_force_fifo.sh
index ecaa7ac..239bc37 100755
--- a/tests/functional/test_force_fifo.sh
+++ b/tests/functional/test_force_fifo.sh
@@ -218,8 +218,10 @@ ret=$?
 
 if [ $ret -ne 0 ] && [ $ret -ne 124 ]; then
     pass "single-threaded mode rejected FIFO"
+elif grep -qiE "single.*thread|falling back|adaptive" "${FIFO_SINGLE_LOG}"; then
+    pass "stalld detected incompatibility and fell back to adaptive mode"
 else
-    fail "stalld did not reject -F in single-threaded mode"
+    fail "stalld silently accepted FIFO in single-threaded mode"
 fi
 
 #=============================================================================
diff --git a/tests/helpers/test_helpers.sh b/tests/helpers/test_helpers.sh
index 6e29a3b..9d49b55 100755
--- a/tests/helpers/test_helpers.sh
+++ b/tests/helpers/test_helpers.sh
@@ -537,7 +537,7 @@ wait_for_log_message() {
 wait_for_stalld_ready() {
 	local log_file=$1
 	local timeout=${2:-15}
-	wait_for_log_message "checking cpu\|waiting tasks" "${timeout}" "${log_file}"
+	wait_for_log_message "checking cpu\|waiting tasks\|skipping" "${timeout}" "${log_file}"
 }
 
 # Wait for stalld to detect a starving task.
-- 
2.53.0