[Devel] [PATCH hci-8.1 v4 1/3] selftests/bpf: xsk: exit with the status test_exit() is given

Konstantin Khorenko khorenko at virtuozzo.com
Tue Oct 27 21:15:19 MSK 2026


From: Eva Kurchatova <eva.kurchatova at virtuozzo.com>

test_exit() prints the status it is given, then exits 1 whatever it
was. Every "skip all tests" of test_xsk.sh, no veth support or no ip
utility, reaches the kselftest runner as a failure.

Exit with the given status. The callers pass $ksft_fail or $ksft_skip,
so a failure still exits 1.

Fixes: 895b62eed2ab ("selftests: xsk: fix reporting of failed tests")
https://virtuozzo.atlassian.net/browse/VSTOR-150731

Feature: fix selftests
Signed-off-by: Eva Kurchatova <eva.kurchatova at virtuozzo.com>
Reviewed-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 tools/testing/selftests/bpf/xsk_prereqs.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/bpf/xsk_prereqs.sh b/tools/testing/selftests/bpf/xsk_prereqs.sh
index 47c7b8064f38b..12176d85cd6cf 100755
--- a/tools/testing/selftests/bpf/xsk_prereqs.sh
+++ b/tools/testing/selftests/bpf/xsk_prereqs.sh
@@ -50,7 +50,7 @@ test_exit()
 	if [ $1 -ne 0 ]; then
 		test_status $1 $(basename $0)
 	fi
-	exit 1
+	exit $1
 }
 
 cleanup_iface()

-- 
2.43.0



More information about the Devel mailing list