Skip to content

Commit cded7e0

Browse files
wdebruijkuba-moo
authored andcommitted
selftests/net: packetdrill: run in netns and expand config
Run packetdrill tests inside netns. They may change system settings, such as sysctl. Also expand config with a few more needed CONFIGs. Link: https://lore.kernel.org/netdev/[email protected]/ Signed-off-by: Willem de Bruijn <[email protected]> Acked-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent eda5891 commit cded7e0

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
CONFIG_IPV6=y
2+
CONFIG_HZ_1000=y
3+
CONFIG_HZ=1000
4+
CONFIG_NET_NS=y
25
CONFIG_NET_SCH_FIFO=y
36
CONFIG_PROC_SYSCTL=y
7+
CONFIG_SYN_COOKIES=y
8+
CONFIG_TCP_CONG_CUBIC=y
49
CONFIG_TCP_MD5SIG=y
510
CONFIG_TUN=y

tools/testing/selftests/net/packetdrill/ksft_runner.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ fi
3333
ktap_print_header
3434
ktap_set_plan 2
3535

36-
packetdrill ${ipv4_args[@]} $(basename $script) > /dev/null \
36+
unshare -n packetdrill ${ipv4_args[@]} $(basename $script) > /dev/null \
3737
&& ktap_test_pass "ipv4" || ktap_test_fail "ipv4"
38-
packetdrill ${ipv6_args[@]} $(basename $script) > /dev/null \
38+
unshare -n packetdrill ${ipv6_args[@]} $(basename $script) > /dev/null \
3939
&& ktap_test_pass "ipv6" || ktap_test_fail "ipv6"
4040

4141
ktap_finished

0 commit comments

Comments
 (0)