1 #!/bin/sh 1 #!/bin/sh 2 # SPDX-License-Identifier: GPL-2.0 2 # SPDX-License-Identifier: GPL-2.0 3 # 3 # 4 # Regression tests for IPv6 flowlabels 4 # Regression tests for IPv6 flowlabels 5 # 5 # 6 # run in separate namespaces to avoid mgmt db 6 # run in separate namespaces to avoid mgmt db conflicts betweent tests 7 7 8 set -e 8 set -e 9 9 10 echo "TEST management" 10 echo "TEST management" 11 ./in_netns.sh ./ipv6_flowlabel_mgr 11 ./in_netns.sh ./ipv6_flowlabel_mgr 12 12 13 echo "TEST datapath" 13 echo "TEST datapath" 14 ./in_netns.sh \ 14 ./in_netns.sh \ 15 sh -c 'sysctl -q -w net.ipv6.auto_flowlabels 15 sh -c 'sysctl -q -w net.ipv6.auto_flowlabels=0 && ./ipv6_flowlabel -l 1' 16 16 17 echo "TEST datapath (with auto-flowlabels)" 17 echo "TEST datapath (with auto-flowlabels)" 18 ./in_netns.sh \ 18 ./in_netns.sh \ 19 sh -c 'sysctl -q -w net.ipv6.auto_flowlabels 19 sh -c 'sysctl -q -w net.ipv6.auto_flowlabels=1 && ./ipv6_flowlabel -l 1' 20 20 21 echo "TEST datapath (with ping-sockets)" 21 echo "TEST datapath (with ping-sockets)" 22 ./in_netns.sh \ 22 ./in_netns.sh \ 23 sh -c 'sysctl -q -w net.ipv6.flowlabel_refle 23 sh -c 'sysctl -q -w net.ipv6.flowlabel_reflect=4 && \ 24 sysctl -q -w net.ipv4.ping_group_range="0 24 sysctl -q -w net.ipv4.ping_group_range="0 2147483647" && \ 25 ./ipv6_flowlabel -l 1 -p' 25 ./ipv6_flowlabel -l 1 -p' 26 26 27 echo "TEST datapath (with flowinfo-send)" 27 echo "TEST datapath (with flowinfo-send)" 28 ./in_netns.sh \ 28 ./in_netns.sh \ 29 sh -c './ipv6_flowlabel -l 1 -s' 29 sh -c './ipv6_flowlabel -l 1 -s' 30 30 31 echo "TEST datapath (with ping-sockets flowinf 31 echo "TEST datapath (with ping-sockets flowinfo-send)" 32 ./in_netns.sh \ 32 ./in_netns.sh \ 33 sh -c 'sysctl -q -w net.ipv6.flowlabel_refle 33 sh -c 'sysctl -q -w net.ipv6.flowlabel_reflect=4 && \ 34 sysctl -q -w net.ipv4.ping_group_range="0 34 sysctl -q -w net.ipv4.ping_group_range="0 2147483647" && \ 35 ./ipv6_flowlabel -l 1 -p -s' 35 ./ipv6_flowlabel -l 1 -p -s' 36 36 37 echo OK. All tests passed 37 echo OK. All tests passed
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.