Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: bpf: notification about privilege required to run test_kmod.sh testing script

The test_kmod.sh script require root privilege for the successful
execution of the test.

This patch is to notify the user about the privilege the script
demands for the successful execution of the test.

Signed-off-by: Jeffrin Jose T (Rajagiri SET) <ahiliation@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>

authored by

Jeffrin Jose T and committed by
Daniel Borkmann
81e167c2 f2e72a0b

+9
+9
tools/testing/selftests/bpf/test_kmod.sh
··· 1 1 #!/bin/sh 2 2 # SPDX-License-Identifier: GPL-2.0 3 3 4 + # Kselftest framework requirement - SKIP code is 4. 5 + ksft_skip=4 6 + 7 + msg="skip all tests:" 8 + if [ "$(id -u)" != "0" ]; then 9 + echo $msg please run this as root >&2 10 + exit $ksft_skip 11 + fi 12 + 4 13 SRC_TREE=../../../../ 5 14 6 15 test_run()