Page MenuHomeFreeBSD

tests/ndp: fix ndp_routeinfo_option testcase flakiness
ClosedPublic

Authored by siva on Apr 29 2026, 4:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 4, 11:37 AM
Unknown Object (File)
Thu, Jun 4, 12:55 AM
Unknown Object (File)
Tue, Jun 2, 9:33 PM
Unknown Object (File)
Tue, Jun 2, 3:33 PM
Unknown Object (File)
Tue, Jun 2, 11:17 AM
Unknown Object (File)
Sat, May 30, 9:43 PM
Unknown Object (File)
Sat, May 30, 9:43 PM
Unknown Object (File)
Sat, May 30, 12:04 PM

Details

Summary

Since we are sleeping for an indefinite period of time waiting
for the default route to appear, the expire times may be gone
past 1+ seconds, causing the Expire column to show <1800 or <600.

Fixes: f6bcc0925f0ea838da5183dc503f847e56d15cc8

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

siva requested review of this revision.Apr 29 2026, 4:23 PM

LGTM, please see my comment.

tests/sys/netinet6/ndp.sh
838

could you please add another -lt 600 to make sure it doesn't mix with expiration time of ${route2}?

This revision is now accepted and ready to land.Apr 29 2026, 4:30 PM
tests/sys/netinet6/ndp.sh
838

What do you mean by "mix with expiration time"? They are two different routes with two different row entries in the output of netstat -rn6.

tests/sys/netinet6/ndp.sh
838

What do you mean by "mix with expiration time"? They are two different routes with two different row entries in the output of netstat -rn6.

Yes, let me rephrase that.
Here, I'm testing any mistakes or regressions that might happen in sys/netinet6/nd6_rtr.c.
I want to make sure the expiration time of ${route1} doesn't end up with the expiration time of ${route2} by mistake from kernel.
So we could simply test whether the expiration time of ${route1} is between 1800 and 600.

The code is good as is.
It was just a suggestion.
Thank you for your fix.

This revision now requires review to proceed.May 4 2026, 3:56 PM

Hi,
Thank you so much.
I'm getting some error during debug, but it pass the test:

Executing command [ jexec v6t-ndp_routeinfo_option ndp -r ]
v6t-ndp_routeinfo_option: removed
Fail: incorrect exit status: 1, expected: 0
stdout:

stderr:

test: ^3fff:1000::/32[[:space:]]+fe80::1cbd:fdff:fed8:2793: bad number
Fail: incorrect exit status: 1, expected: 0
stdout:

stderr:

test: ^3fff:2000::/48[[:space:]]+fe80::1cbd:fdff:fed8:2793: bad number
sys/netinet6/ndp:ndp_routeinfo_option  ->  passed

Please go with your initial version.
I will add expiration checks for that later.
Thank you again.

Fixed bad grep '+' and simplified tests to avoid using xargs in v3.

Can you try now?

This revision is now accepted and ready to land.May 4 2026, 5:24 PM