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: 74999aac5e ("in6: Modify address prefix lifetimes when updating address lifetimes")
MFC after: 1 week
Sponsored by: Klara, Inc.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user