]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
selftests: netconsole: ignore busywait errors
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>
Fri, 10 Jul 2026 18:04:47 +0000 (20:04 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 21 Jul 2026 22:01:30 +0000 (15:01 -0700)
In these netconsole tests, bash is used with errexit (set -e). It means
that if the busywait timeout, the tests finish without printing an error
message.

It is fine to ignore these errors, because the following validate_xxx
helpers will check the content of the output file, and exit with an
appropriated error message, e.g. FAIL: File was not generated.

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Reviewed-by: Breno Leitao <leitao@debian.org>
Link: https://patch.msgid.link/20260710-net-sft-fix-containers-v1-7-a2915c294ef5@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/drivers/net/netconsole/netcons_cmdline.sh
tools/testing/selftests/drivers/net/netconsole/netcons_fragmented_msg.sh
tools/testing/selftests/drivers/net/netconsole/netcons_resume.sh
tools/testing/selftests/drivers/net/netconsole/netcons_sysdata.sh

index 96d704b8d9d90897c693cee03e88a6d1ddd62227..4436567abc94a0a53028b4420fceb7be83faea10 100755 (executable)
@@ -50,7 +50,7 @@ do
        # Send the message
        echo "${MSG}: ${TARGET}" > /dev/kmsg
        # Wait until socat saves the file to disk
-       busywait "${BUSYWAIT_TIMEOUT}" test -s "${OUTPUT_FILE}"
+       busywait "${BUSYWAIT_TIMEOUT}" test -s "${OUTPUT_FILE}" || true
        # Make sure the message was received in the dst part
        # and exit
        validate_msg "${OUTPUT_FILE}"
index 0dc7280c30807aff8ed2f2516bddd42590f63a18..fc3db40c1df5bd68dc38656f63e83aefd6a32fb0 100755 (executable)
@@ -104,7 +104,7 @@ wait_local_port_listen "${NAMESPACE}" "${PORT}" udp
 # Send the message
 echo "${MSG}: ${TARGET}" > /dev/kmsg
 # Wait until socat saves the file to disk
-busywait "${BUSYWAIT_TIMEOUT}" test -s "${OUTPUT_FILE}"
+busywait "${BUSYWAIT_TIMEOUT}" test -s "${OUTPUT_FILE}" || true
 # Check if the message was not corrupted
 validate_fragmented_result "${OUTPUT_FILE}"
 
@@ -117,6 +117,6 @@ disable_release_append
 listen_port_and_save_to "${OUTPUT_FILE}" &
 wait_local_port_listen "${NAMESPACE}" "${PORT}" udp
 echo "${MSG}: ${TARGET}" > /dev/kmsg
-busywait "${BUSYWAIT_TIMEOUT}" test -s "${OUTPUT_FILE}"
+busywait "${BUSYWAIT_TIMEOUT}" test -s "${OUTPUT_FILE}" || true
 validate_fragmented_result "${OUTPUT_FILE}"
 exit "${ksft_pass}"
index d9111f2102bcd1df524e0a95a8606695cb958614..b379dff9087eb191bc3ff718abd97c8d8b397329 100755 (executable)
@@ -108,7 +108,7 @@ do
        # Send the message
        echo "${MSG}: ${TARGET}" > /dev/kmsg
        # Wait until socat saves the file to disk
-       busywait "${BUSYWAIT_TIMEOUT}" test -s "${OUTPUT_FILE}"
+       busywait "${BUSYWAIT_TIMEOUT}" test -s "${OUTPUT_FILE}" || true
        # Make sure the message was received in the dst part
        # and exit
        validate_msg "${OUTPUT_FILE}"
index 3fb8c4afe3d2cfea3b2bb7be13c549b244954503..7089f7bd1e340d0b52fa62ffdd028bc5ac142b70 100755 (executable)
@@ -197,7 +197,7 @@ function runtest {
        # Send the message
        taskset -c "${CPU}" echo "${MSG}: ${TARGET}" > /dev/kmsg
        # Wait until socat saves the file to disk
-       busywait "${BUSYWAIT_TIMEOUT}" test -s "${OUTPUT_FILE}"
+       busywait "${BUSYWAIT_TIMEOUT}" test -s "${OUTPUT_FILE}" || true
 }
 
 # ========== #