Skip to content

Commit dd349c3

Browse files
Jeffrin Jose Tborkmann
authored andcommitted
selftests: bpf: notification about privilege required to run test_lwt_seg6local.sh testing script
This test needs root privilege for it's successful execution. This patch is atleast used to notify the user about the privilege the script demands for the smooth execution of the test. Signed-off-by: Jeffrin Jose T (Rajagiri SET) <ahiliation@gmail.com> Acked-by: Song Liu <songliubraving@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
1 parent b0e4b8b commit dd349c3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tools/testing/selftests/bpf/test_lwt_seg6local.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@
2121
# An UDP datagram is sent from fb00::1 to fb00::6. The test succeeds if this
2222
# datagram can be read on NS6 when binding to fb00::6.
2323

24+
# Kselftest framework requirement - SKIP code is 4.
25+
ksft_skip=4
26+
27+
msg="skip all tests:"
28+
if [ $UID != 0 ]; then
29+
echo $msg please run this as root >&2
30+
exit $ksft_skip
31+
fi
32+
2433
TMP_FILE="/tmp/selftest_lwt_seg6local.txt"
2534

2635
cleanup()

0 commit comments

Comments
 (0)