From: Wander Lairson Costa <wander@redhat.com>
To: Clark Williams <williams@redhat.com>,
John Kacur <jkacur@redhat.com>,
linux-rt-users@vger.kernel.org
Cc: Juri Lelli <juri.lelli@redhat.com>,
luffyluo@tencent.com, davidlt@rivosinc.com,
Wander Lairson Costa <wander@redhat.com>
Subject: [[PATCH stalld] 23/33] tests: Remove dead code after making fail() fatal
Date: Wed, 20 May 2026 11:00:50 -0300 [thread overview]
Message-ID: <20260520140104.112142-24-wander@redhat.com> (raw)
In-Reply-To: <20260520140104.112142-1-wander@redhat.com>
The previous commit making test failures abort immediately rendered
several teardown and reporting mechanisms obsolete. Since any failing
test now exits the script immediately, end-of-run test summaries
reporting the total number of failures will always evaluate to zero
during a successful run. These redundant summary banners and failure
counts have been removed across all multi-section tests.
This cleanup also drops trailing completion messages and empty log
lines that previously cluttered the test output. Unreachable cleanup
steps and return statements situated directly after failure calls are
now safely discarded. Furthermore, unconditional debug log dumps on
success paths have been stripped to keep successful test runs quiet.
Finally, rotting references to specific source code line numbers and
redundant backend limitation notes were purged. The relevant backend
constraints remain appropriately documented inline where they apply.
Signed-off-by: Wander Lairson Costa <wander@redhat.com>
Assisted-by: Claude Code:claude-opus-4-6[1m] [PAL]
---
tests/functional/test_affinity.sh | 3 ---
tests/functional/test_backend_selection.sh | 2 --
tests/functional/test_boost_duration.sh | 3 ---
tests/functional/test_boost_period.sh | 6 ------
tests/functional/test_boost_restoration.sh | 6 ------
tests/functional/test_boost_runtime.sh | 3 ---
tests/functional/test_deadline_boosting.sh | 6 ------
tests/functional/test_fifo_boosting.sh | 6 ------
tests/functional/test_fifo_priority_starvation.sh | 13 -------------
tests/functional/test_force_fifo.sh | 3 ---
tests/functional/test_idle_detection.sh | 6 ------
tests/functional/test_log_only.sh | 6 ------
tests/functional/test_pidfile.sh | 3 ---
tests/functional/test_starvation_detection.sh | 6 ------
tests/functional/test_starvation_threshold.sh | 3 ---
tests/functional/test_task_merging.sh | 9 ---------
16 files changed, 84 deletions(-)
diff --git a/tests/functional/test_affinity.sh b/tests/functional/test_affinity.sh
index 15a8756..3faa199 100755
--- a/tests/functional/test_affinity.sh
+++ b/tests/functional/test_affinity.sh
@@ -190,7 +190,4 @@ assert_success "CPU affinity persisted over time" test "$affinity_start" = "$aff
stop_stalld
-log ""
-log "All affinity tests completed"
-
end_test
diff --git a/tests/functional/test_backend_selection.sh b/tests/functional/test_backend_selection.sh
index d65695b..26654e1 100755
--- a/tests/functional/test_backend_selection.sh
+++ b/tests/functional/test_backend_selection.sh
@@ -40,8 +40,6 @@ test_backend_flag() {
if ! wait_for_stalld_ready "${log_file}" 15; then
fail "stalld failed to start (${description})"
- stop_stalld
- return 1
fi
assert_log_contains "${log_file}" "${expected_msg}" "${description}"
diff --git a/tests/functional/test_boost_duration.sh b/tests/functional/test_boost_duration.sh
index aa46e84..3d6a823 100755
--- a/tests/functional/test_boost_duration.sh
+++ b/tests/functional/test_boost_duration.sh
@@ -112,7 +112,4 @@ assert_stalld_rejects "Zero duration rejected with error" -f -v -t ${threshold}
log "Testing with duration = -5"
assert_stalld_rejects "Negative duration rejected with error" -f -v -t ${threshold} -d -5
-log ""
-log "All boost duration tests completed"
-
end_test
diff --git a/tests/functional/test_boost_period.sh b/tests/functional/test_boost_period.sh
index 1bb4e12..4b76c6e 100755
--- a/tests/functional/test_boost_period.sh
+++ b/tests/functional/test_boost_period.sh
@@ -106,10 +106,4 @@ test_section "Test 6: Invalid period value (negative)"
assert_stalld_rejects "Negative period rejected with error" -f -v -t $threshold -p -1000000
-#=============================================================================
-# Final Summary
-#=============================================================================
-test_section "Test Summary"
-log "Total failures: ${TEST_FAILED}"
-
end_test
diff --git a/tests/functional/test_boost_restoration.sh b/tests/functional/test_boost_restoration.sh
index 32a5a02..ddf3940 100755
--- a/tests/functional/test_boost_restoration.sh
+++ b/tests/functional/test_boost_restoration.sh
@@ -192,10 +192,4 @@ fi
# Cleanup
cleanup_scenario "${STARVE_PID}"
-#=============================================================================
-# Final Summary
-#=============================================================================
-test_section "Test Summary"
-log "Total failures: ${TEST_FAILED}"
-
end_test
diff --git a/tests/functional/test_boost_runtime.sh b/tests/functional/test_boost_runtime.sh
index caaeb1d..dcfd7e7 100755
--- a/tests/functional/test_boost_runtime.sh
+++ b/tests/functional/test_boost_runtime.sh
@@ -127,7 +127,4 @@ test_section "Test 7: Invalid runtime value (negative)"
log "Testing with runtime = -5000"
assert_stalld_rejects "Negative runtime rejected with error" -f -v -t ${threshold} -r -5000
-log ""
-log "All boost runtime tests completed"
-
end_test
diff --git a/tests/functional/test_deadline_boosting.sh b/tests/functional/test_deadline_boosting.sh
index 50e949c..094c146 100755
--- a/tests/functional/test_deadline_boosting.sh
+++ b/tests/functional/test_deadline_boosting.sh
@@ -197,10 +197,4 @@ else
cleanup_scenario "${STARVE_PID0}" "${STARVE_PID1}"
fi
-#=============================================================================
-# Final Summary
-#=============================================================================
-test_section "Test Summary"
-log "Total failures: ${TEST_FAILED}"
-
end_test
diff --git a/tests/functional/test_fifo_boosting.sh b/tests/functional/test_fifo_boosting.sh
index 4da1182..cabc740 100755
--- a/tests/functional/test_fifo_boosting.sh
+++ b/tests/functional/test_fifo_boosting.sh
@@ -131,10 +131,4 @@ fi
# Cleanup
cleanup_scenario "${STARVE_PID}"
-#=============================================================================
-# Final Summary
-#=============================================================================
-test_section "Test Summary"
-log "Total failures: ${TEST_FAILED}"
-
end_test
diff --git a/tests/functional/test_fifo_priority_starvation.sh b/tests/functional/test_fifo_priority_starvation.sh
index a4e1a65..072c951 100755
--- a/tests/functional/test_fifo_priority_starvation.sh
+++ b/tests/functional/test_fifo_priority_starvation.sh
@@ -204,17 +204,4 @@ fi
# Cleanup
cleanup_scenario "${STARVE_PID}"
-#=============================================================================
-# Final Summary
-#=============================================================================
-test_section "Test Summary"
-log "Total failures: ${TEST_FAILED}"
-
-if [ -n "${STALLD_TEST_BACKEND}" ] && [ "${STALLD_TEST_BACKEND}" = "queue_track" ]; then
- log ""
- log "NOTE: queue_track backend has known limitations with SCHED_FIFO task detection."
- log " For reliable FIFO-on-FIFO testing, use the sched_debug backend:"
- log " ./test_fifo_priority_starvation.sh -b sched_debug"
-fi
-
end_test
diff --git a/tests/functional/test_force_fifo.sh b/tests/functional/test_force_fifo.sh
index d2a6281..aa66f77 100755
--- a/tests/functional/test_force_fifo.sh
+++ b/tests/functional/test_force_fifo.sh
@@ -112,7 +112,4 @@ test_section "Test 5: Single-threaded mode with FIFO (should fail)"
log "Testing single-threaded mode (-O) with -F (should exit)"
assert_stalld_rejects "Single-threaded mode rejected FIFO" -f -v -c "${TEST_CPU}" -t ${threshold} -F -O
-log ""
-log "All force FIFO tests completed"
-
end_test
diff --git a/tests/functional/test_idle_detection.sh b/tests/functional/test_idle_detection.sh
index 20dfea6..81a9fe1 100755
--- a/tests/functional/test_idle_detection.sh
+++ b/tests/functional/test_idle_detection.sh
@@ -117,10 +117,4 @@ else
cleanup_scenario "${STARVE_PID}"
fi
-#=============================================================================
-# Final Summary
-#=============================================================================
-test_section "Test Summary"
-log "Total failures: ${TEST_FAILED}"
-
end_test
diff --git a/tests/functional/test_log_only.sh b/tests/functional/test_log_only.sh
index 6a26b93..824ef7a 100755
--- a/tests/functional/test_log_only.sh
+++ b/tests/functional/test_log_only.sh
@@ -66,10 +66,4 @@ assert_log_contains --negate "${LOG_FILE}" "boosted" "stalld did not boost in lo
# Cleanup
cleanup_scenario "${STARVGEN_PID}"
-echo ""
-echo "Log file contents:"
-echo "=================="
-cat "${LOG_FILE}"
-echo "=================="
-
end_test
diff --git a/tests/functional/test_pidfile.sh b/tests/functional/test_pidfile.sh
index 75b5359..a2e5eb0 100755
--- a/tests/functional/test_pidfile.sh
+++ b/tests/functional/test_pidfile.sh
@@ -149,7 +149,4 @@ log "ℹ INFO: Pidfile permissions: $perms"
stop_stalld
-log ""
-log "All pidfile tests completed"
-
end_test
diff --git a/tests/functional/test_starvation_detection.sh b/tests/functional/test_starvation_detection.sh
index 1d43516..17d7fe0 100755
--- a/tests/functional/test_starvation_detection.sh
+++ b/tests/functional/test_starvation_detection.sh
@@ -193,10 +193,4 @@ assert_log_contains --negate --ignore-case "${STALLD_LOG}" "error\|segfault\|cra
stop_stalld
-#=============================================================================
-# Final Summary
-#=============================================================================
-test_section "Test Summary"
-log "Total failures: ${TEST_FAILED}"
-
end_test
diff --git a/tests/functional/test_starvation_threshold.sh b/tests/functional/test_starvation_threshold.sh
index b0eeb59..6e84966 100755
--- a/tests/functional/test_starvation_threshold.sh
+++ b/tests/functional/test_starvation_threshold.sh
@@ -115,7 +115,4 @@ assert_stalld_rejects "Zero threshold rejected with error" -f -v -t 0
log "Testing with threshold = -5"
assert_stalld_rejects "Negative threshold rejected with error" -f -v -t -5
-log ""
-log "All starvation threshold tests completed"
-
end_test
diff --git a/tests/functional/test_task_merging.sh b/tests/functional/test_task_merging.sh
index 434114b..5e03622 100755
--- a/tests/functional/test_task_merging.sh
+++ b/tests/functional/test_task_merging.sh
@@ -226,13 +226,4 @@ else
cleanup_scenario "${STARVE_PID0}" "${STARVE_PID1}"
fi
-#=============================================================================
-# Final Summary
-#=============================================================================
-test_section "Test Summary"
-log "Task merging function: merge_tasks_info() in stalld.c:370-397"
-log "Merge logic: if (PID == PID && ctxsw == ctxsw) preserve timestamp"
-log ""
-log "Total failures: ${TEST_FAILED}"
-
end_test
--
2.54.0
next prev parent reply other threads:[~2026-05-20 14:02 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-20 14:00 [[PATCH stalld] 00/33] Test suite hardening, correctness fixes, and BPF optimization Wander Lairson Costa
2026-05-20 14:00 ` [[PATCH stalld] 01/33] stalld: Reject --force_fifo in single-threaded mode Wander Lairson Costa
2026-05-20 14:00 ` [[PATCH stalld] 02/33] tests: Introduce test_section() helper Wander Lairson Costa
2026-05-20 14:00 ` [[PATCH stalld] 03/33] tests: Introduce cleanup_scenario() helper Wander Lairson Costa
2026-05-20 14:00 ` [[PATCH stalld] 04/33] tests: Introduce starvation and boost asserts Wander Lairson Costa
2026-05-20 14:00 ` [[PATCH stalld] 05/33] tests: Introduce find_starved_child() helper Wander Lairson Costa
2026-05-20 14:00 ` [[PATCH stalld] 06/33] tests: Fix task exit timing in test_boost_restoration Wander Lairson Costa
2026-05-20 14:00 ` [[PATCH stalld] 07/33] tests: Consolidate and adopt init_functional_test() Wander Lairson Costa
2026-05-20 14:00 ` [[PATCH stalld] 08/33] tests: Introduce assert_stalld_rejects() helper Wander Lairson Costa
2026-05-20 14:00 ` [[PATCH stalld] 09/33] tests: Fix boost verification in runtime and duration tests Wander Lairson Costa
2026-05-20 14:00 ` [[PATCH stalld] 10/33] tests: Fix subshell swallowing test results Wander Lairson Costa
2026-05-20 14:00 ` [[PATCH stalld] 11/33] tests: Fix repeated log match finding same line Wander Lairson Costa
2026-05-20 14:00 ` [[PATCH stalld] 12/33] chore: Remove legacy test infrastructure and stale docs Wander Lairson Costa
2026-05-20 14:00 ` [[PATCH stalld] 13/33] tests: Add assertions to SCHED_OTHER restoration test Wander Lairson Costa
2026-05-20 14:00 ` [[PATCH stalld] 14/33] tests: Fix CPU selection grep substring matches Wander Lairson Costa
2026-05-20 14:00 ` [[PATCH stalld] 15/33] tests: Add idle CPU skipping assertion Wander Lairson Costa
2026-05-20 14:00 ` [[PATCH stalld] 16/33] tests: Remove redundant pkill from cleanup Wander Lairson Costa
2026-05-20 14:00 ` [[PATCH stalld] 17/33] tests: Introduce and adopt assert_log_contains() helper Wander Lairson Costa
2026-05-20 14:00 ` [[PATCH stalld] 18/33] tests: Remove weak, redundant, and assertion-free test blocks Wander Lairson Costa
2026-05-20 14:00 ` [[PATCH stalld] 19/33] tests: Introduce and adopt assert_success() helper Wander Lairson Costa
2026-05-20 14:00 ` [[PATCH stalld] 20/33] tests: Replace wait conditionals with asserts Wander Lairson Costa
2026-05-20 14:00 ` [[PATCH stalld] 21/33] tests: Remove if-wrappers around assert calls Wander Lairson Costa
2026-05-20 14:00 ` [[PATCH stalld] 22/33] tests: Abort immediately on test failure Wander Lairson Costa
2026-05-20 14:00 ` Wander Lairson Costa [this message]
2026-05-20 14:00 ` [[PATCH stalld] 24/33] tests: Introduce and adopt process helpers Wander Lairson Costa
2026-05-20 14:00 ` [[PATCH stalld] 25/33] tests: Extract wait_for_process_exit helper Wander Lairson Costa
2026-05-20 14:00 ` [[PATCH stalld] 26/33] tests: Reduce default wait timeouts Wander Lairson Costa
2026-05-20 14:00 ` [[PATCH stalld] 27/33] tests: Reduce starvation_gen durations Wander Lairson Costa
2026-05-20 14:00 ` [[PATCH stalld] 28/33] tests: Replace init sleeps in test_affinity Wander Lairson Costa
2026-05-20 14:00 ` [[PATCH stalld] 29/33] tests: Drop redundant sleeps in test_pidfile Wander Lairson Costa
2026-05-20 14:00 ` [[PATCH stalld] 30/33] tests: Remove redundant sleeps after start_stalld Wander Lairson Costa
2026-05-20 14:00 ` [[PATCH stalld] 31/33] tests: Reduce timing and replace sleeps with event waits Wander Lairson Costa
2026-05-20 14:00 ` [[PATCH stalld] 32/33] tests: Fix async-signal-unsafe handler Wander Lairson Costa
2026-05-20 14:01 ` [[PATCH stalld] 33/33] bpf: Replace linear task scan with hash map Wander Lairson Costa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260520140104.112142-24-wander@redhat.com \
--to=wander@redhat.com \
--cc=davidlt@rivosinc.com \
--cc=jkacur@redhat.com \
--cc=juri.lelli@redhat.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=luffyluo@tencent.com \
--cc=williams@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.