tests/netinet6: fix ndp_del_gu_success flakiness

The test pinged an unanswered address and then deleted the resulting
INCOMPLETE neighbor entry.
The kernel frees that entry after about 3s, so on a loaded VM,
ndp -d could run too late and fail with ENOENT.

Configure 2001:db8::2 on epair0b so the ping gets a reply and the
entry becomes REACHABLE.

Approved by:	pouria
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D60348
This commit is contained in:
Olivier Cochard committed 2026-10-07 06:07:17 +02:00
1 parent 77a7a48a1c
commit a6a864080c
1 file changed
+8 -4
+8 -4
View File
@@ -85,17 +85,21 @@ ndp_del_gu_success_body() {
vnet_mkjail ${jname} ${epair0}a
jexec ${jname} ndp -i ${epair0}a -- -disabled
jexec ${jname} ifconfig ${epair0}a up
ndp_if_up ${epair0}a ${jname}
ndp_if_up ${epair0}b
jexec ${jname} ifconfig ${epair0}a inet6 2001:db8::1/64
ifconfig ${epair0}b inet6 2001:db8::2/64
# wait for DAD to complete
while [ `jexec ${jname} ifconfig | grep inet6 | grep -c tentative` != "0" ]; do
while jexec ${jname} ifconfig ${epair0}a inet6 | grep -q tentative ||
ifconfig ${epair0}b inet6 | grep -q tentative; do
sleep 0.1
done
jexec ${jname} ping -c1 -t1 2001:db8::2
# A reachable peer keeps the entry alive; an unanswered solicitation
# would expire it after nd6_mmaxtries retransmissions (about 3s).
atf_check -o ignore jexec ${jname} ping -c1 -t5 2001:db8::2
atf_check -o match:"2001:db8::2 \(2001:db8::2\) deleted" jexec ${jname} ndp -nd 2001:db8::2
}