aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2019-10-24 20:08:33 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2019-10-24 20:08:33 +0000
commit4527b28baf0d6ca9e78eefd821b2c95181cd61e8 (patch)
treea2e6f7d3449d98b3b641a12c0116f35b8e41dbf0
parent4a91aa8fc9b626834dec65629decf48d1e3d5036 (diff)
downloadsrc-4527b28baf0d6ca9e78eefd821b2c95181cd61e8.tar.gz
src-4527b28baf0d6ca9e78eefd821b2c95181cd61e8.zip
frag6 test cases: check more counters, wait for expiry
When done with tests check that both the per-VNET and the global-fragmented- packets-in-system counters are zero to make sure we do not leak counters or queue entries. This implies that for all test cases we either have to check for the ICMPv6 packet sent in case of TLL=0 expiry (if it is sent) or sleep at least long enough for the TTL to expire for all packets (e.g., fragments where we do not have the off=0 packet). This also means that statistics are now updated to include all the expired packets. There are cases when we do not check for counters to be zero and this is when testing VNET teardown to behave properly and not panic, when we are intentionally leaving fragments in the system. MFC after: 3 weeks Sponsored by: Netflix
Notes
Notes: svn path=/head/; revision=354045
-rwxr-xr-xtests/sys/netinet6/frag6/frag6_01.sh10
-rwxr-xr-xtests/sys/netinet6/frag6/frag6_02.sh10
-rw-r--r--tests/sys/netinet6/frag6/frag6_03.py5
-rwxr-xr-xtests/sys/netinet6/frag6/frag6_03.sh10
-rwxr-xr-xtests/sys/netinet6/frag6/frag6_04.sh10
-rw-r--r--tests/sys/netinet6/frag6/frag6_05.py2
-rwxr-xr-xtests/sys/netinet6/frag6/frag6_05.sh31
-rwxr-xr-xtests/sys/netinet6/frag6/frag6_06.sh11
-rw-r--r--tests/sys/netinet6/frag6/frag6_07.py28
-rwxr-xr-xtests/sys/netinet6/frag6/frag6_07.sh21
-rw-r--r--tests/sys/netinet6/frag6/frag6_08.py34
-rwxr-xr-xtests/sys/netinet6/frag6/frag6_08.sh21
-rwxr-xr-xtests/sys/netinet6/frag6/frag6_09.sh10
-rw-r--r--tests/sys/netinet6/frag6/frag6_10.py2
-rwxr-xr-xtests/sys/netinet6/frag6/frag6_10.sh16
-rwxr-xr-xtests/sys/netinet6/frag6/frag6_11.sh10
-rwxr-xr-xtests/sys/netinet6/frag6/frag6_12.sh10
-rw-r--r--tests/sys/netinet6/frag6/frag6_13.py2
-rwxr-xr-xtests/sys/netinet6/frag6/frag6_13.sh20
-rw-r--r--tests/sys/netinet6/frag6/frag6_14.py2
-rwxr-xr-xtests/sys/netinet6/frag6/frag6_14.sh20
-rwxr-xr-xtests/sys/netinet6/frag6/frag6_15.sh11
-rwxr-xr-xtests/sys/netinet6/frag6/frag6_16.sh11
23 files changed, 275 insertions, 32 deletions
diff --git a/tests/sys/netinet6/frag6/frag6_01.sh b/tests/sys/netinet6/frag6/frag6_01.sh
index fb2e1de856d3..198cc15bebd6 100755
--- a/tests/sys/netinet6/frag6/frag6_01.sh
+++ b/tests/sys/netinet6/frag6/frag6_01.sh
@@ -52,6 +52,16 @@ frag6_01_check_stats() {
# The Python script has to wait for this already to get the ICMPv6
# hence we do not sleep here anymore.
+ nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;;
+ esac
+ nf=`sysctl -n net.inet6.ip6.frag6_nfrags`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;;
+ esac
#
# Check selection of global UDP stats.
diff --git a/tests/sys/netinet6/frag6/frag6_02.sh b/tests/sys/netinet6/frag6/frag6_02.sh
index 02d2a5a1e723..d3573d53eeb4 100755
--- a/tests/sys/netinet6/frag6/frag6_02.sh
+++ b/tests/sys/netinet6/frag6/frag6_02.sh
@@ -52,6 +52,16 @@ frag6_02_check_stats() {
# The Python script has to wait for this already to get the ICMPv6
# hence we do not sleep here anymore.
+ nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;;
+ esac
+ nf=`sysctl -n net.inet6.ip6.frag6_nfrags`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;;
+ esac
#
# Check selection of global UDP stats.
diff --git a/tests/sys/netinet6/frag6/frag6_03.py b/tests/sys/netinet6/frag6/frag6_03.py
index 64c92abfecc8..c3f890c7bc40 100644
--- a/tests/sys/netinet6/frag6/frag6_03.py
+++ b/tests/sys/netinet6/frag6/frag6_03.py
@@ -82,20 +82,21 @@ def main():
########################################################################
#
- # (1) Atomic fragment.
+ # Atomic fragment.
#
# A: Nothing listening on UDP port.
# R: ICMPv6 dst unreach, unreach port.
#
ip6f01 = sp.Ether() / \
sp.IPv6(src=args.src[0], dst=args.to[0]) / \
- sp.IPv6ExtHdrFragment(offset=0, m=0, id=1) / \
+ sp.IPv6ExtHdrFragment(offset=0, m=0, id=3) / \
sp.UDP(dport=3456, sport=6543)
if args.debug :
ip6f01.display()
sp.sendp(ip6f01, iface=args.sendif[0], verbose=False)
sleep(0.10)
+ sniffer.setEnd()
sniffer.join()
if not sniffer.foundCorrectPacket:
sys.exit(1)
diff --git a/tests/sys/netinet6/frag6/frag6_03.sh b/tests/sys/netinet6/frag6/frag6_03.sh
index edfdbe04d101..1881ff463229 100755
--- a/tests/sys/netinet6/frag6/frag6_03.sh
+++ b/tests/sys/netinet6/frag6/frag6_03.sh
@@ -52,6 +52,16 @@ frag6_03_check_stats() {
# The Python script has to wait for this already to get the ICMPv6
# hence we do not sleep here anymore.
+ nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;;
+ esac
+ nf=`sysctl -n net.inet6.ip6.frag6_nfrags`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;;
+ esac
#
# Check selection of global UDP stats.
diff --git a/tests/sys/netinet6/frag6/frag6_04.sh b/tests/sys/netinet6/frag6/frag6_04.sh
index 81f3a276514c..5655d9c8e63b 100755
--- a/tests/sys/netinet6/frag6/frag6_04.sh
+++ b/tests/sys/netinet6/frag6/frag6_04.sh
@@ -52,6 +52,16 @@ frag6_04_check_stats() {
# The Python script has to wait for this already to get the ICMPv6
# hence we do not sleep here anymore.
+ nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;;
+ esac
+ nf=`sysctl -n net.inet6.ip6.frag6_nfrags`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;;
+ esac
#
# Check selection of global UDP stats.
diff --git a/tests/sys/netinet6/frag6/frag6_05.py b/tests/sys/netinet6/frag6/frag6_05.py
index b631b48f500f..d67c35581bbf 100644
--- a/tests/sys/netinet6/frag6/frag6_05.py
+++ b/tests/sys/netinet6/frag6/frag6_05.py
@@ -76,6 +76,8 @@ def main():
ip6f01.display()
sp.sendp(ip6f01, iface=args.sendif[0], verbose=False)
+ # Wait for possible expiry to happen.
+ sleep(75)
sys.exit(0)
if __name__ == '__main__':
diff --git a/tests/sys/netinet6/frag6/frag6_05.sh b/tests/sys/netinet6/frag6/frag6_05.sh
index ed4c09b60d69..ff1504a6b023 100755
--- a/tests/sys/netinet6/frag6/frag6_05.sh
+++ b/tests/sys/netinet6/frag6/frag6_05.sh
@@ -47,6 +47,17 @@ frag6_05_check_stats_0() {
# The Python script has to wait for this already to get the ICMPv6
# hence we do not sleep here anymore.
+ nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;;
+ esac
+ nf=`sysctl -n net.inet6.ip6.frag6_nfrags`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;;
+ esac
+
#
# Check that the sysctl is set to what we expect.
#
@@ -229,6 +240,16 @@ frag6_05_check_stats_1() {
# The Python script has to wait for this already to get the ICMPv6
# hence we do not sleep here anymore.
+ nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;;
+ esac
+ nf=`sysctl -n net.inet6.ip6.frag6_nfrags`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;;
+ esac
#
# Check that the sysctl is set to what we expect.
@@ -272,7 +293,7 @@ EOF
<dropped-bad-version>0</dropped-bad-version>
<received-fragments>20</received-fragments>
<dropped-fragment>10</dropped-fragment>
- <dropped-fragment-after-timeout>0</dropped-fragment-after-timeout>
+ <dropped-fragment-after-timeout>10</dropped-fragment-after-timeout>
<dropped-fragments-overflow>0</dropped-fragments-overflow>
<atomic-fragments>0</atomic-fragments>
<reassembled-packets>0</reassembled-packets>
@@ -300,7 +321,7 @@ EOF
# XXX-TODO check output histogram (just too hard to parse [no multi-line-grep])
#
cat <<EOF > ${HOME}/filter-${jname}.txt
- <icmp6-calls>0</icmp6-calls>
+ <icmp6-calls>10</icmp6-calls>
<no-route>0</no-route>
<admin-prohibited>0</admin-prohibited>
<beyond-scope>0</beyond-scope>
@@ -308,7 +329,7 @@ EOF
<port-unreachable>0</port-unreachable>
<packet-too-big>0</packet-too-big>
<time-exceed-transmit>0</time-exceed-transmit>
- <time-exceed-reassembly>0</time-exceed-reassembly>
+ <time-exceed-reassembly>10</time-exceed-reassembly>
<bad-header>0</bad-header>
<bad-next-header>0</bad-next-header>
<bad-option>0</bad-option>
@@ -372,10 +393,10 @@ EOF
<received-echo-replies>0</received-echo-replies>
<received-router-solicitation>0</received-router-solicitation>
<received-router-advertisement>0</received-router-advertisement>
- <sent-errors>0</sent-errors>
+ <sent-errors>10</sent-errors>
<sent-destination-unreachable>0</sent-destination-unreachable>
<sent-admin-prohibited>0</sent-admin-prohibited>
- <sent-time-exceeded>0</sent-time-exceeded>
+ <sent-time-exceeded>10</sent-time-exceeded>
<sent-bad-parameter>0</sent-bad-parameter>
<sent-packet-too-big>0</sent-packet-too-big>
<sent-echo-requests>0</sent-echo-requests>
diff --git a/tests/sys/netinet6/frag6/frag6_06.sh b/tests/sys/netinet6/frag6/frag6_06.sh
index f5997c80f8a7..d8ee70d22401 100755
--- a/tests/sys/netinet6/frag6/frag6_06.sh
+++ b/tests/sys/netinet6/frag6/frag6_06.sh
@@ -61,6 +61,17 @@ frag6_06_check_stats_0() {
# The Python script has to wait for this already to get the ICMPv6
# hence we do not sleep here anymore.
+ nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;;
+ esac
+ nf=`sysctl -n net.inet6.ip6.frag6_nfrags`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;;
+ esac
+
#
# Check that the sysctl is set to what we expect.
#
diff --git a/tests/sys/netinet6/frag6/frag6_07.py b/tests/sys/netinet6/frag6/frag6_07.py
index f559046e67bf..c84a783137d3 100644
--- a/tests/sys/netinet6/frag6/frag6_07.py
+++ b/tests/sys/netinet6/frag6/frag6_07.py
@@ -54,6 +54,25 @@ def check_icmp6_error(args, packet):
#icmp6.display()
return True
+def check_icmp6_error_2(args, packet):
+ ip6 = packet.getlayer(sp.IPv6)
+ if not ip6:
+ return False
+ oip6 = sp.IPv6(src=args.src[0], dst=args.to[0])
+ if ip6.dst != oip6.src:
+ return False
+ icmp6 = packet.getlayer(sp.ICMPv6TimeExceeded)
+ if not icmp6:
+ return False
+ # ICMP6_TIME_EXCEED_REASSEMBLY 1
+ if icmp6.code != 1:
+ return False
+ # Should we check the payload as well?
+ # We are running in a very isolated environment and nothing else
+ # should trigger an ICMPv6 Time Exceeded / Frag reassembly so leave it.
+ #icmp6.display()
+ return True
+
def main():
parser = argparse.ArgumentParser("frag6.py",
description="IPv6 fragementation test tool")
@@ -78,6 +97,7 @@ def main():
# Start sniffing on recvif
sniffer = Sniffer(args, check_icmp6_error)
+ sniffer2 = Sniffer(args, check_icmp6_error_2)
########################################################################
@@ -88,6 +108,7 @@ def main():
#
# A: Reassembly failure.
# R: ICMPv6 param prob, param header.
+ # R: ICMPv6 timeout (1st frag, off=0)
#
data = "6" * 1280
ip6f01 = \
@@ -144,6 +165,13 @@ def main():
if not sniffer.foundCorrectPacket:
sys.exit(1)
+ # Wait for expiry from first test run.
+ sleep(75)
+ sniffer2.setEnd()
+ sniffer2.join()
+ if not sniffer2.foundCorrectPacket:
+ sys.exit(1)
+
sys.exit(0)
if __name__ == '__main__':
diff --git a/tests/sys/netinet6/frag6/frag6_07.sh b/tests/sys/netinet6/frag6/frag6_07.sh
index 927472b794a8..fcd719e52e4d 100755
--- a/tests/sys/netinet6/frag6/frag6_07.sh
+++ b/tests/sys/netinet6/frag6/frag6_07.sh
@@ -47,6 +47,17 @@ frag6_07_check_stats() {
# The Python script has to wait for this already to get the ICMPv6
# hence we do not sleep here anymore.
+ nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;;
+ esac
+ nf=`sysctl -n net.inet6.ip6.frag6_nfrags`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;;
+ esac
+
#
# Check selection of global UDP stats.
#
@@ -81,7 +92,7 @@ EOF
<dropped-bad-version>0</dropped-bad-version>
<received-fragments>3</received-fragments>
<dropped-fragment>0</dropped-fragment>
- <dropped-fragment-after-timeout>0</dropped-fragment-after-timeout>
+ <dropped-fragment-after-timeout>1</dropped-fragment-after-timeout>
<dropped-fragments-overflow>0</dropped-fragments-overflow>
<atomic-fragments>0</atomic-fragments>
<reassembled-packets>0</reassembled-packets>
@@ -109,7 +120,7 @@ EOF
# XXX-TODO check output histogram (just too hard to parse [no multi-line-grep])
#
cat <<EOF > ${HOME}/filter-${jname}.txt
- <icmp6-calls>2</icmp6-calls>
+ <icmp6-calls>3</icmp6-calls>
<no-route>0</no-route>
<admin-prohibited>0</admin-prohibited>
<beyond-scope>0</beyond-scope>
@@ -117,7 +128,7 @@ EOF
<port-unreachable>0</port-unreachable>
<packet-too-big>0</packet-too-big>
<time-exceed-transmit>0</time-exceed-transmit>
- <time-exceed-reassembly>0</time-exceed-reassembly>
+ <time-exceed-reassembly>1</time-exceed-reassembly>
<bad-header>2</bad-header>
<bad-next-header>0</bad-next-header>
<bad-option>0</bad-option>
@@ -181,10 +192,10 @@ EOF
<received-echo-replies>0</received-echo-replies>
<received-router-solicitation>0</received-router-solicitation>
<received-router-advertisement>0</received-router-advertisement>
- <sent-errors>2</sent-errors>
+ <sent-errors>3</sent-errors>
<sent-destination-unreachable>0</sent-destination-unreachable>
<sent-admin-prohibited>0</sent-admin-prohibited>
- <sent-time-exceeded>0</sent-time-exceeded>
+ <sent-time-exceeded>1</sent-time-exceeded>
<sent-bad-parameter>2</sent-bad-parameter>
<sent-packet-too-big>0</sent-packet-too-big>
<sent-echo-requests>0</sent-echo-requests>
diff --git a/tests/sys/netinet6/frag6/frag6_08.py b/tests/sys/netinet6/frag6/frag6_08.py
index 7d63c11b58a6..fa17e1e5c774 100644
--- a/tests/sys/netinet6/frag6/frag6_08.py
+++ b/tests/sys/netinet6/frag6/frag6_08.py
@@ -54,6 +54,26 @@ def check_icmp6_error(args, packet):
#icmp6.display()
return True
+def check_icmp6_error_2(args, packet):
+ ip6 = packet.getlayer(sp.IPv6)
+ if not ip6:
+ return False
+ oip6 = sp.IPv6(src=args.src[0], dst=args.to[0])
+ if ip6.dst != oip6.src:
+ return False
+ icmp6 = packet.getlayer(sp.ICMPv6TimeExceeded)
+ if not icmp6:
+ return False
+ # ICMP6_TIME_EXCEED_REASSEMBLY 1
+ if icmp6.code != 1:
+ return False
+ # Should we check the payload as well?
+ # We are running in a very isolated environment and nothing else
+ # should trigger an ICMPv6 Time Exceeded / Frag reassembly so leave it.
+ #icmp6.display()
+ return True
+
+
def main():
parser = argparse.ArgumentParser("frag6.py",
description="IPv6 fragementation test tool")
@@ -78,15 +98,20 @@ def main():
# Start sniffing on recvif
sniffer = Sniffer(args, check_icmp6_error)
+ sniffer2 = Sniffer(args, check_icmp6_error_2)
########################################################################
#
# A fragment with payload and offset set to add up to >64k when
# another frag with offset=0 arrives and has an unfrag part.
+ # This is us checking for all fragments queued already when the
+ # one with off=0 arrives. Note: unless the off=0 has its own problem
+ # it will be queued and off!=0 ones might be expunged with param prob.
#
- # A: Reassembly failure (timeout) after
- # R: ICMPv6 param prob, param header (earlier).
+ # A: Reassembly failure, timeout after
+ # R: ICMPv6 param prob, param header (1st frag)
+ # R: ICMPv6 time exceeded (2nd frag, as off=0)
#
data = "6" * 15
ip6f01 = \
@@ -115,6 +140,11 @@ def main():
sniffer.join()
if not sniffer.foundCorrectPacket:
sys.exit(1)
+ sleep(75)
+ sniffer2.setEnd()
+ sniffer2.join()
+ if not sniffer2.foundCorrectPacket:
+ sys.exit(1)
sys.exit(0)
diff --git a/tests/sys/netinet6/frag6/frag6_08.sh b/tests/sys/netinet6/frag6/frag6_08.sh
index 3de04f539e08..19aa7214494d 100755
--- a/tests/sys/netinet6/frag6/frag6_08.sh
+++ b/tests/sys/netinet6/frag6/frag6_08.sh
@@ -47,6 +47,17 @@ frag6_08_check_stats() {
# The Python script has to wait for this already to get the ICMPv6
# hence we do not sleep here anymore.
+ nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;;
+ esac
+ nf=`sysctl -n net.inet6.ip6.frag6_nfrags`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;;
+ esac
+
#
# Check selection of global UDP stats.
#
@@ -81,7 +92,7 @@ EOF
<dropped-bad-version>0</dropped-bad-version>
<received-fragments>2</received-fragments>
<dropped-fragment>0</dropped-fragment>
- <dropped-fragment-after-timeout>0</dropped-fragment-after-timeout>
+ <dropped-fragment-after-timeout>1</dropped-fragment-after-timeout>
<dropped-fragments-overflow>0</dropped-fragments-overflow>
<atomic-fragments>0</atomic-fragments>
<reassembled-packets>0</reassembled-packets>
@@ -109,7 +120,7 @@ EOF
# XXX-TODO check output histogram (just too hard to parse [no multi-line-grep])
#
cat <<EOF > ${HOME}/filter-${jname}.txt
- <icmp6-calls>1</icmp6-calls>
+ <icmp6-calls>2</icmp6-calls>
<no-route>0</no-route>
<admin-prohibited>0</admin-prohibited>
<beyond-scope>0</beyond-scope>
@@ -117,7 +128,7 @@ EOF
<port-unreachable>0</port-unreachable>
<packet-too-big>0</packet-too-big>
<time-exceed-transmit>0</time-exceed-transmit>
- <time-exceed-reassembly>0</time-exceed-reassembly>
+ <time-exceed-reassembly>1</time-exceed-reassembly>
<bad-header>1</bad-header>
<bad-next-header>0</bad-next-header>
<bad-option>0</bad-option>
@@ -181,10 +192,10 @@ EOF
<received-echo-replies>0</received-echo-replies>
<received-router-solicitation>0</received-router-solicitation>
<received-router-advertisement>0</received-router-advertisement>
- <sent-errors>1</sent-errors>
+ <sent-errors>2</sent-errors>
<sent-destination-unreachable>0</sent-destination-unreachable>
<sent-admin-prohibited>0</sent-admin-prohibited>
- <sent-time-exceeded>0</sent-time-exceeded>
+ <sent-time-exceeded>1</sent-time-exceeded>
<sent-bad-parameter>1</sent-bad-parameter>
<sent-packet-too-big>0</sent-packet-too-big>
<sent-echo-requests>0</sent-echo-requests>
diff --git a/tests/sys/netinet6/frag6/frag6_09.sh b/tests/sys/netinet6/frag6/frag6_09.sh
index 6936a75d397a..e97cc03e5843 100755
--- a/tests/sys/netinet6/frag6/frag6_09.sh
+++ b/tests/sys/netinet6/frag6/frag6_09.sh
@@ -52,6 +52,16 @@ frag6_09_check_stats() {
# The Python script has to wait for this already to get the ICMPv6
# hence we do not sleep here anymore.
+ nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;;
+ esac
+ nf=`sysctl -n net.inet6.ip6.frag6_nfrags`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;;
+ esac
#
# Check selection of global UDP stats.
diff --git a/tests/sys/netinet6/frag6/frag6_10.py b/tests/sys/netinet6/frag6/frag6_10.py
index 716324a469d9..02d25bd96450 100644
--- a/tests/sys/netinet6/frag6/frag6_10.py
+++ b/tests/sys/netinet6/frag6/frag6_10.py
@@ -72,6 +72,8 @@ def main():
sp.sendp(ip6f01, iface=args.sendif[0], verbose=False)
# We do not generate ICMPv6 for non-off=0-segments.
+ # Wait for expiry.
+ sleep(75)
sys.exit(0)
diff --git a/tests/sys/netinet6/frag6/frag6_10.sh b/tests/sys/netinet6/frag6/frag6_10.sh
index fb1a26ad8699..bf3d0f4e2070 100755
--- a/tests/sys/netinet6/frag6/frag6_10.sh
+++ b/tests/sys/netinet6/frag6/frag6_10.sh
@@ -52,6 +52,16 @@ frag6_10_check_stats() {
# The Python script has to wait for this already to get the ICMPv6
# hence we do not sleep here anymore.
+ nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;;
+ esac
+ nf=`sysctl -n net.inet6.ip6.frag6_nfrags`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;;
+ esac
#
# Check selection of global UDP stats.
@@ -77,8 +87,8 @@ EOF
#
# Check selection of global IPv6 stats.
- # We do not seem to sent a timeout ICMPv6 for this one?
- # No, as it is not an off=0 segment.
+ # We do not sent a timeout ICMPv6 for this one
+ # as it is not an off=0 segment.
#
cat <<EOF > ${HOME}/filter-${jname}.txt
<dropped-below-minimum-size>0</dropped-below-minimum-size>
@@ -87,7 +97,7 @@ EOF
<dropped-bad-version>0</dropped-bad-version>
<received-fragments>1</received-fragments>
<dropped-fragment>0</dropped-fragment>
- <dropped-fragment-after-timeout>0</dropped-fragment-after-timeout>
+ <dropped-fragment-after-timeout>1</dropped-fragment-after-timeout>
<dropped-fragments-overflow>0</dropped-fragments-overflow>
<atomic-fragments>0</atomic-fragments>
<reassembled-packets>0</reassembled-packets>
diff --git a/tests/sys/netinet6/frag6/frag6_11.sh b/tests/sys/netinet6/frag6/frag6_11.sh
index 606b7d936c15..6329d7cd7677 100755
--- a/tests/sys/netinet6/frag6/frag6_11.sh
+++ b/tests/sys/netinet6/frag6/frag6_11.sh
@@ -52,6 +52,16 @@ frag6_11_check_stats() {
# The Python script has to wait for this already to get the ICMPv6
# hence we do not sleep here anymore.
+ nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;;
+ esac
+ nf=`sysctl -n net.inet6.ip6.frag6_nfrags`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;;
+ esac
#
# Check selection of global UDP stats.
diff --git a/tests/sys/netinet6/frag6/frag6_12.sh b/tests/sys/netinet6/frag6/frag6_12.sh
index 33121b868922..7fdee7f850b2 100755
--- a/tests/sys/netinet6/frag6/frag6_12.sh
+++ b/tests/sys/netinet6/frag6/frag6_12.sh
@@ -52,6 +52,16 @@ frag6_12_check_stats() {
# The Python script has to wait for this already to get the ICMPv6
# hence we do not sleep here anymore.
+ nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;;
+ esac
+ nf=`sysctl -n net.inet6.ip6.frag6_nfrags`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;;
+ esac
#
# Check selection of global UDP stats.
diff --git a/tests/sys/netinet6/frag6/frag6_13.py b/tests/sys/netinet6/frag6/frag6_13.py
index 4ff96990db60..da3b2afe239f 100644
--- a/tests/sys/netinet6/frag6/frag6_13.py
+++ b/tests/sys/netinet6/frag6/frag6_13.py
@@ -114,6 +114,8 @@ def main():
sp.sendp(ip6f01, iface=args.sendif[0], verbose=False)
sp.sendp(ip6f02, iface=args.sendif[0], verbose=False)
+ # Wait for expiry.
+ sleep(75)
sys.exit(0)
if __name__ == '__main__':
diff --git a/tests/sys/netinet6/frag6/frag6_13.sh b/tests/sys/netinet6/frag6/frag6_13.sh
index 22d143a0f0af..c6d64dd82d45 100755
--- a/tests/sys/netinet6/frag6/frag6_13.sh
+++ b/tests/sys/netinet6/frag6/frag6_13.sh
@@ -52,6 +52,16 @@ frag6_13_check_stats() {
# The Python script has to wait for this already to get the ICMPv6
# hence we do not sleep here anymore.
+ nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;;
+ esac
+ nf=`sysctl -n net.inet6.ip6.frag6_nfrags`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;;
+ esac
#
# Check selection of global UDP stats.
@@ -85,7 +95,7 @@ EOF
<dropped-bad-version>0</dropped-bad-version>
<received-fragments>4</received-fragments>
<dropped-fragment>2</dropped-fragment>
- <dropped-fragment-after-timeout>0</dropped-fragment-after-timeout>
+ <dropped-fragment-after-timeout>2</dropped-fragment-after-timeout>
<dropped-fragments-overflow>0</dropped-fragments-overflow>
<atomic-fragments>0</atomic-fragments>
<reassembled-packets>0</reassembled-packets>
@@ -112,7 +122,7 @@ EOF
# Check selection of global ICMPv6 stats.
#
cat <<EOF > ${HOME}/filter-${jname}.txt
- <icmp6-calls>0</icmp6-calls>
+ <icmp6-calls>2</icmp6-calls>
<no-route>0</no-route>
<admin-prohibited>0</admin-prohibited>
<beyond-scope>0</beyond-scope>
@@ -120,7 +130,7 @@ EOF
<port-unreachable>0</port-unreachable>
<packet-too-big>0</packet-too-big>
<time-exceed-transmit>0</time-exceed-transmit>
- <time-exceed-reassembly>0</time-exceed-reassembly>
+ <time-exceed-reassembly>2</time-exceed-reassembly>
<bad-header>0</bad-header>
<bad-next-header>0</bad-next-header>
<bad-option>0</bad-option>
@@ -184,10 +194,10 @@ EOF
<received-echo-replies>0</received-echo-replies>
<received-router-solicitation>0</received-router-solicitation>
<received-router-advertisement>0</received-router-advertisement>
- <sent-errors>0</sent-errors>
+ <sent-errors>2</sent-errors>
<sent-destination-unreachable>0</sent-destination-unreachable>
<sent-admin-prohibited>0</sent-admin-prohibited>
- <sent-time-exceeded>0</sent-time-exceeded>
+ <sent-time-exceeded>2</sent-time-exceeded>
<sent-bad-parameter>0</sent-bad-parameter>
<sent-packet-too-big>0</sent-packet-too-big>
<sent-echo-requests>0</sent-echo-requests>
diff --git a/tests/sys/netinet6/frag6/frag6_14.py b/tests/sys/netinet6/frag6/frag6_14.py
index a1533aa6c887..915571cfc36f 100644
--- a/tests/sys/netinet6/frag6/frag6_14.py
+++ b/tests/sys/netinet6/frag6/frag6_14.py
@@ -129,6 +129,8 @@ def main():
sp.sendp(ip6f01, iface=args.sendif[0], verbose=False)
sp.sendp(ip6f02, iface=args.sendif[0], verbose=False)
+ # Wait for expiry.
+ sleep(75)
sys.exit(0)
if __name__ == '__main__':
diff --git a/tests/sys/netinet6/frag6/frag6_14.sh b/tests/sys/netinet6/frag6/frag6_14.sh
index 7c9a04119923..11acfbb68694 100755
--- a/tests/sys/netinet6/frag6/frag6_14.sh
+++ b/tests/sys/netinet6/frag6/frag6_14.sh
@@ -52,6 +52,16 @@ frag6_14_check_stats() {
# The Python script has to wait for this already to get the ICMPv6
# hence we do not sleep here anymore.
+ nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;;
+ esac
+ nf=`sysctl -n net.inet6.ip6.frag6_nfrags`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;;
+ esac
#
# Check selection of global UDP stats.
@@ -85,7 +95,7 @@ EOF
<dropped-bad-version>0</dropped-bad-version>
<received-fragments>6</received-fragments>
<dropped-fragment>2</dropped-fragment>
- <dropped-fragment-after-timeout>0</dropped-fragment-after-timeout>
+ <dropped-fragment-after-timeout>4</dropped-fragment-after-timeout>
<dropped-fragments-overflow>0</dropped-fragments-overflow>
<atomic-fragments>0</atomic-fragments>
<reassembled-packets>0</reassembled-packets>
@@ -112,7 +122,7 @@ EOF
# Check selection of global ICMPv6 stats.
#
cat <<EOF > ${HOME}/filter-${jname}.txt
- <icmp6-calls>0</icmp6-calls>
+ <icmp6-calls>1</icmp6-calls>
<no-route>0</no-route>
<admin-prohibited>0</admin-prohibited>
<beyond-scope>0</beyond-scope>
@@ -120,7 +130,7 @@ EOF
<port-unreachable>0</port-unreachable>
<packet-too-big>0</packet-too-big>
<time-exceed-transmit>0</time-exceed-transmit>
- <time-exceed-reassembly>0</time-exceed-reassembly>
+ <time-exceed-reassembly>1</time-exceed-reassembly>
<bad-header>0</bad-header>
<bad-next-header>0</bad-next-header>
<bad-option>0</bad-option>
@@ -184,10 +194,10 @@ EOF
<received-echo-replies>0</received-echo-replies>
<received-router-solicitation>0</received-router-solicitation>
<received-router-advertisement>0</received-router-advertisement>
- <sent-errors>0</sent-errors>
+ <sent-errors>1</sent-errors>
<sent-destination-unreachable>0</sent-destination-unreachable>
<sent-admin-prohibited>0</sent-admin-prohibited>
- <sent-time-exceeded>0</sent-time-exceeded>
+ <sent-time-exceeded>1</sent-time-exceeded>
<sent-bad-parameter>0</sent-bad-parameter>
<sent-packet-too-big>0</sent-packet-too-big>
<sent-echo-requests>0</sent-echo-requests>
diff --git a/tests/sys/netinet6/frag6/frag6_15.sh b/tests/sys/netinet6/frag6/frag6_15.sh
index 1b31bf103994..2b6317ecb7f0 100755
--- a/tests/sys/netinet6/frag6/frag6_15.sh
+++ b/tests/sys/netinet6/frag6/frag6_15.sh
@@ -61,6 +61,17 @@ frag6_15_check_stats() {
# The Python script has to wait for this already to get the ICMPv6
# hence we do not sleep here anymore.
+ nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;;
+ esac
+ nf=`sysctl -n net.inet6.ip6.frag6_nfrags`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;;
+ esac
+
#
# Check that the sysctl is set to what we expect.
#
diff --git a/tests/sys/netinet6/frag6/frag6_16.sh b/tests/sys/netinet6/frag6/frag6_16.sh
index 2d0e43b3a39e..f5f582ec7823 100755
--- a/tests/sys/netinet6/frag6/frag6_16.sh
+++ b/tests/sys/netinet6/frag6/frag6_16.sh
@@ -48,6 +48,17 @@ frag6_16_check_stats() {
# The Python script has to wait for this already to get the ICMPv6
# hence we do not sleep here anymore.
+ nf=`jexec ${jname} sysctl -n net.inet6.ip6.frag6_nfragpackets`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "VNET frag6_nfragpackets not 0 but: ${nf}" ;;
+ esac
+ nf=`sysctl -n net.inet6.ip6.frag6_nfrags`
+ case ${nf} in
+ 0) break ;;
+ *) atf_fail "Global frag6_nfrags not 0 but: ${nf}" ;;
+ esac
+
#
# Check selection of global UDP stats.
#