Skip to content

Commit e4d5d07

Browse files
Cypresslingregkh
authored andcommitted
selftests: rtnetlink: load fou module for kci_test_encap_fou() test
[ Upstream commit 26ebd6f ] The kci_test_encap_fou() test from kci_test_encap() in rtnetlink.sh needs the fou module to work. Otherwise it will fail with: $ ip netns exec "$testns" ip fou add port 7777 ipproto 47 RTNETLINK answers: No such file or directory Error talking to the kernel Add the CONFIG_NET_FOU into the config file as well. Which needs at least to be set as a loadable module. Fixes: 6227efc ("selftests: rtnetlink.sh: add vxlan and fou test cases") Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com> Link: https://lore.kernel.org/r/20201019030928.9859-1-po-hsu.lin@canonical.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 8ab1b9e commit e4d5d07

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎tools/testing/selftests/net/config‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ CONFIG_NET_SCH_ETF=m
3131
CONFIG_NET_SCH_NETEM=y
3232
CONFIG_TEST_BLACKHOLE_DEV=m
3333
CONFIG_KALLSYMS=y
34+
CONFIG_NET_FOU=m

‎tools/testing/selftests/net/rtnetlink.sh‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,11 @@ kci_test_encap_fou()
521521
return $ksft_skip
522522
fi
523523

524+
if ! /sbin/modprobe -q -n fou; then
525+
echo "SKIP: module fou is not found"
526+
return $ksft_skip
527+
fi
528+
/sbin/modprobe -q fou
524529
ip -netns "$testns" fou add port 7777 ipproto 47 2>/dev/null
525530
if [ $? -ne 0 ];then
526531
echo "FAIL: can't add fou port 7777, skipping test"

0 commit comments

Comments
 (0)