[PATCH stalld 23/36] tests/functional: Use start_stalld_with_log() in test_logging_destinations
Wander Lairson Costa <[email protected]>
| Newsgroups | org.kernel.vger.linux-rt-users |
|---|---|
| Message-ID | <[email protected]> |
Replace direct stalld invocations in Tests 1 and 4 with start_stalld_with_log(), which handles backend selection, PID tracking, and readiness detection internally. This also removes the now-unnecessary BACKEND_FLAG variable. Signed-off-by: Wander Lairson Costa <[email protected]> --- tests/functional/test_logging_destinations.sh | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/tests/functional/test_logging_destinations.sh b/tests/functional/test_logging_destinations.sh index 171be8b..b44c08d 100755 --- a/tests/functional/test_logging_destinations.sh +++ b/tests/functional/test_logging_destinations.sh @@ -33,16 +33,7 @@ echo "Test 1: Verbose mode (-v) logs to stdout" LOG_FILE="/tmp/stalld_test_verbose_$$.log" CLEANUP_FILES+=("${LOG_FILE}") -# Start stalld directly (not using start_stalld helper) to capture output -# Add backend flag if specified via test runner -BACKEND_FLAG="" -if [ -n "${STALLD_TEST_BACKEND}" ]; then - BACKEND_FLAG="-b ${STALLD_TEST_BACKEND}" -fi -"${TEST_ROOT}/../stalld" -f -v ${BACKEND_FLAG} -l -t 5 > "${LOG_FILE}" 2>&1 & -STALLD_PID=$! -CLEANUP_PIDS+=("${STALLD_PID}") -sleep 2 +start_stalld_with_log "${LOG_FILE}" -f -v -l -t 5 if assert_process_running "${STALLD_PID}" "stalld should be running"; then # Check that output was written to our log file @@ -160,11 +151,7 @@ echo "Test 4: Combined logging modes" LOG_FILE="/tmp/stalld_test_combined_$$.log" CLEANUP_FILES+=("${LOG_FILE}") -# Start stalld directly (not using start_stalld helper) to capture output -"${TEST_ROOT}/../stalld" -f -v -k -s ${BACKEND_FLAG} -l -t 5 > "${LOG_FILE}" 2>&1 & -STALLD_PID=$! -CLEANUP_PIDS+=("${STALLD_PID}") -sleep 2 +start_stalld_with_log "${LOG_FILE}" -f -v -k -s -l -t 5 if assert_process_running "${STALLD_PID}" "stalld with combined logging should be running"; then # Verify verbose output -- 2.53.0