History log of /freebsd-current/tests/sys/netinet6/frag6/frag6_07.sh
Revision Date Author Comments
# d0b2dbfa 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


# 314ef80d 16-Feb-2020 Li-Wen Hsu <lwhsu@FreeBSD.org>

Temporarily skip flakey test case sys.netinet6.frag6.frag6_07.frag6_07 in CI

PR: 244170
Sponsored by: The FreeBSD Foundation


# 4527b28b 24-Oct-2019 Bjoern A. Zeeb <bz@FreeBSD.org>

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


# f74e6e49 21-Oct-2019 Bjoern A. Zeeb <bz@FreeBSD.org>

frag6: import a set of test cases

In order to ensure that changing the frag6 code does not change behaviour
or break code a set of test cases were implemented.

Like some other test cases these use Scapy to generate packets and possibly
wait for expected answers. In most cases we do check the global and
per interface (netstat) statistics output using the libxo output and grep
to validate fields and numbers. This is a bit hackish but we currently have
no better way to match a selected number of stats only (we have to ignore
some of the ND6 variables; otherwise we could use the entire list).

Test cases include atomic fragments, single fragments, multi-fragments,
and try to cover most error cases in the code currently.
In addition vnet teardown is tested to not panic.

A separate set (not in-tree currently) of probes were used in order to
make sure that the test cases actually test what they should.

The "sniffer" code was copied and adjusted from the netpfil version
as we sometimes will not get packets or have longer timeouts to deal with.

Sponsored by: Netflix