diff options
author | Hangbin Liu <liuhangbin@gmail.com> | 2023-12-02 03:01:01 +0100 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2023-12-05 13:00:56 +0100 |
commit | 7c16d485fec5d0010b992e75ad996e7382950879 (patch) | |
tree | 01f3612fb6468ec6bf58fe2934b52f3abe5c4560 /tools/testing/selftests/net/cmsg_time.sh | |
parent | selftests/net: convert arp_ndisc_untracked_subnets.sh to run it in unique nam... (diff) | |
download | linux-7c16d485fec5d0010b992e75ad996e7382950879.tar.xz linux-7c16d485fec5d0010b992e75ad996e7382950879.zip |
selftests/net: convert cmsg tests to make them run in unique namespace
Here is the test result after conversion.
]# ./cmsg_ipv6.sh
OK
]# ./cmsg_so_mark.sh
OK
]# ./cmsg_time.sh
OK
Acked-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'tools/testing/selftests/net/cmsg_time.sh')
-rwxr-xr-x | tools/testing/selftests/net/cmsg_time.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/testing/selftests/net/cmsg_time.sh b/tools/testing/selftests/net/cmsg_time.sh index 91161e1da734..af85267ad1e3 100755 --- a/tools/testing/selftests/net/cmsg_time.sh +++ b/tools/testing/selftests/net/cmsg_time.sh @@ -1,7 +1,8 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 -NS=ns +source lib.sh + IP4=172.16.0.1/24 TGT4=172.16.0.2 IP6=2001:db8:1::1/64 @@ -9,13 +10,13 @@ TGT6=2001:db8:1::2 cleanup() { - ip netns del $NS + cleanup_ns $NS } trap cleanup EXIT # Namespaces -ip netns add $NS +setup_ns NS ip netns exec $NS sysctl -w net.ipv4.ping_group_range='0 2147483647' > /dev/null |