1 AT_BANNER([kmod-sanity])
3 AT_SETUP([kmod - ping between two ports])
4 OVS_KMOD_VSWITCHD_START(
5 [set-fail-mode br0 standalone -- ])
7 ADD_NAMESPACES(at_ns0, at_ns1)
9 ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
10 ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
12 AT_CAPTURE_FILE([ping.output])
13 AT_CHECK([ip netns exec at_ns0 bash -c "ping -q -c 3 -i 0.3 -w 2 10.1.1.2 > ping.output"])
14 AT_CHECK([ip netns exec at_ns0 bash -c "ping -s 1600 -q -c 3 -i 0.3 -w 2 10.1.1.2 >> ping.output"])
15 AT_CHECK([ip netns exec at_ns0 bash -c "ping -s 3200 -q -c 3 -i 0.3 -w 2 10.1.1.2 >> ping.output"])
17 AT_CHECK([cat ping.output | grep "transmitted" | sed 's/time.*ms$/time 0ms/'], [0], [dnl
18 3 packets transmitted, 3 received, 0% packet loss, time 0ms
19 3 packets transmitted, 3 received, 0% packet loss, time 0ms
20 3 packets transmitted, 3 received, 0% packet loss, time 0ms
23 OVS_KMOD_VSWITCHD_STOP
26 AT_SETUP([kmod - ping between two ports on vlan])
27 OVS_KMOD_VSWITCHD_START(
28 [set-fail-mode br0 standalone -- ])
30 ADD_NAMESPACES(at_ns0, at_ns1)
32 ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
33 ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
35 ADD_VLAN(p0, at_ns0, 100, "10.2.2.1/24")
36 ADD_VLAN(p1, at_ns1, 100, "10.2.2.2/24")
38 AT_CAPTURE_FILE([ping.output])
39 AT_CHECK([ip netns exec at_ns0 bash -c "ping -q -c 3 -i 0.3 -w 2 10.2.2.2 > ping.output"])
40 AT_CHECK([ip netns exec at_ns0 bash -c "ping -s 1600 -q -c 3 -i 0.3 -w 2 10.2.2.2 >> ping.output"])
41 AT_CHECK([ip netns exec at_ns0 bash -c "ping -s 3200 -q -c 3 -i 0.3 -w 2 10.2.2.2 >> ping.output"])
43 AT_CHECK([cat ping.output | grep "transmitted" | sed 's/time.*ms$/time 0ms/'], [0], [dnl
44 3 packets transmitted, 3 received, 0% packet loss, time 0ms
45 3 packets transmitted, 3 received, 0% packet loss, time 0ms
46 3 packets transmitted, 3 received, 0% packet loss, time 0ms
49 OVS_KMOD_VSWITCHD_STOP
52 AT_SETUP([kmod - ping6 between two ports])
53 OVS_KMOD_VSWITCHD_START(
54 [set-fail-mode br0 standalone -- ])
56 ADD_NAMESPACES(at_ns0, at_ns1)
58 ADD_VETH(p0, at_ns0, br0, "fc00::1/96")
59 ADD_VETH(p1, at_ns1, br0, "fc00::2/96")
61 dnl Without this sleep, we get occasional failures due to the following error:
62 dnl "connect: Cannot assign requested address"
65 AT_CAPTURE_FILE([ping.output])
66 AT_CHECK([ip netns exec at_ns0 bash -c "ping6 -q -c 3 -i 0.3 -w 2 fc00::2 > ping.output"])
67 AT_CHECK([ip netns exec at_ns0 bash -c "ping6 -s 1600 -q -c 3 -i 0.3 -w 2 fc00::2 >> ping.output"])
68 AT_CHECK([ip netns exec at_ns0 bash -c "ping6 -s 3200 -q -c 3 -i 0.3 -w 2 fc00::2 >> ping.output"])
70 AT_CHECK([cat ping.output | grep "transmitted" | sed 's/time.*ms$/time 0ms/'], [0], [dnl
71 3 packets transmitted, 3 received, 0% packet loss, time 0ms
72 3 packets transmitted, 3 received, 0% packet loss, time 0ms
73 3 packets transmitted, 3 received, 0% packet loss, time 0ms
76 OVS_KMOD_VSWITCHD_STOP
79 AT_SETUP([kmod - ping6 between two ports on vlan])
80 OVS_KMOD_VSWITCHD_START(
81 [set-fail-mode br0 standalone -- ])
83 ADD_NAMESPACES(at_ns0, at_ns1)
85 ADD_VETH(p0, at_ns0, br0, "fc00::1/96")
86 ADD_VETH(p1, at_ns1, br0, "fc00::2/96")
88 ADD_VLAN(p0, at_ns0, 100, "fc00:1::1/96")
89 ADD_VLAN(p1, at_ns1, 100, "fc00:1::2/96")
91 dnl Without this sleep, we get occasional failures due to the following error:
92 dnl "connect: Cannot assign requested address"
95 AT_CAPTURE_FILE([ping.output])
96 AT_CHECK([ip netns exec at_ns0 bash -c "ping6 -q -c 3 -i 0.3 -w 2 fc00:1::2 > ping.output"])
97 AT_CHECK([ip netns exec at_ns0 bash -c "ping6 -s 1600 -q -c 3 -i 0.3 -w 2 fc00:1::2 >> ping.output"])
98 AT_CHECK([ip netns exec at_ns0 bash -c "ping6 -s 3200 -q -c 3 -i 0.3 -w 2 fc00:1::2 >> ping.output"])
100 AT_CHECK([cat ping.output | grep "transmitted" | sed 's/time.*ms$/time 0ms/'], [0], [dnl
101 3 packets transmitted, 3 received, 0% packet loss, time 0ms
102 3 packets transmitted, 3 received, 0% packet loss, time 0ms
103 3 packets transmitted, 3 received, 0% packet loss, time 0ms
106 OVS_KMOD_VSWITCHD_STOP