aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2026-02-17 17:08:34 +0000
committerMark Johnston <markj@FreeBSD.org>2026-02-17 20:22:05 +0000
commiteb425dfab19be8720cf29d560b4e778fc3531106 (patch)
tree5526b68c0979c0c1dd852c4fb714740d559835fc
parentafd64316c869eb00dde4d6b4af61bca0cb2197f1 (diff)
ndp tests: Fix an assertion in ndp_prefix_lifetime_extend
Here we have two interface addresses sharing a v6 prefix with finite lifetime. The intent was to make sure that adding the second address didn't cause the prefix's valid lifetime to drop from 20s to 10s, but of course, while the test is running it may drop from 20s to 19s, causing the test to fail spuriously. Relax the check a bit to avoid this. PR: 293152 Fixes: 74999aac5eff ("in6: Modify address prefix lifetimes when updating address lifetimes") MFC after: 1 week Sponsored by: Klara, Inc.
-rwxr-xr-xtests/sys/netinet6/ndp.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/sys/netinet6/ndp.sh b/tests/sys/netinet6/ndp.sh
index 8a16316740be..159a51485c49 100755
--- a/tests/sys/netinet6/ndp.sh
+++ b/tests/sys/netinet6/ndp.sh
@@ -357,8 +357,8 @@ ndp_prefix_lifetime_extend_body() {
atf_fail "Unexpected lifetimes: ${t}"
fi
ex3=$(prefix_expiry ${prefix}/64)
- if [ "${ex3}" -lt "${ex2}" ]; then
- atf_fail "Expiry time was shortened: ${ex2} <= ${ex3}"
+ if [ "${ex3}" -le 10 -o "${ex3}" -gt 20 ]; then
+ atf_fail "Unexpected expiry time: ${ex3}"
fi
}