projects
/
linux
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a4ab88
)
selftests/bpf: Fix passing arguments via function in test_kmod.sh
author
Yauheni Kaliuta
<ykaliuta@redhat.com>
Mon, 26 Sep 2022 09:23:20 +0000
(12:23 +0300)
committer
Daniel Borkmann
<daniel@iogearbox.net>
Tue, 27 Sep 2022 13:57:54 +0000
(15:57 +0200)
Since the tests are run in a function $@ there actually contains the
function arguments, not the script ones.
Pass "$@" to the function as well.
Fixes:
272d1f4cfa3c
("selftests: bpf: test_kmod.sh: Pass parameters to the module")
Signed-off-by: Yauheni Kaliuta <ykaliuta@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link:
https://lore.kernel.org/bpf/20220926092320.564631-1-ykaliuta@redhat.com
tools/testing/selftests/bpf/test_kmod.sh
patch
|
blob
|
history
diff --git
a/tools/testing/selftests/bpf/test_kmod.sh
b/tools/testing/selftests/bpf/test_kmod.sh
index d4a4279c0181d28b38826031f076f26ddbd1f443..50dca53ac536a878cb57a29ac6eb0e9ec275af7e 100755
(executable)
--- a/
tools/testing/selftests/bpf/test_kmod.sh
+++ b/
tools/testing/selftests/bpf/test_kmod.sh
@@
-29,6
+29,7
@@
test_run()
sysctl -w net.core.bpf_jit_harden=$2 2>&1 > /dev/null
echo "[ JIT enabled:$1 hardened:$2 ]"
+ shift 2
dmesg -C
if [ -f ${OUTPUT}/lib/test_bpf.ko ]; then
insmod ${OUTPUT}/lib/test_bpf.ko "$@" 2> /dev/null
@@
-64,9
+65,9
@@
test_restore()
rc=0
test_save
-test_run 0 0
-test_run 1 0
-test_run 1 1
-test_run 1 2
+test_run 0 0
"$@"
+test_run 1 0
"$@"
+test_run 1 1
"$@"
+test_run 1 2
"$@"
test_restore
exit $rc