git: eb425dfab19b - main - ndp tests: Fix an assertion in ndp_prefix_lifetime_extend

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Tue, 17 Feb 2026 20:22:36 UTC
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=eb425dfab19be8720cf29d560b4e778fc3531106

commit eb425dfab19be8720cf29d560b4e778fc3531106
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-02-17 17:08:34 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-02-17 20:22:05 +0000

    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.
---
 tests/sys/netinet6/ndp.sh | 4 ++--
 1 file 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
 }