Page MenuHomeFreeBSD

tests/arp: Add a 1-second tolerance
ClosedPublic

Authored by olivier on Fri, Apr 25, 8:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 1, 3:29 AM
Unknown Object (File)
Thu, May 1, 1:49 AM
Unknown Object (File)
Tue, Apr 29, 11:35 AM
Unknown Object (File)
Tue, Apr 29, 11:35 AM
Unknown Object (File)
Tue, Apr 29, 11:35 AM
Unknown Object (File)
Tue, Apr 29, 11:35 AM
Unknown Object (File)
Tue, Apr 29, 11:35 AM
Unknown Object (File)
Tue, Apr 29, 4:32 AM

Details

Summary

This test could be flaky when using the regression test VM because there is only a 1-second delay:

Fail: stdout does not match expected value
--- /tmp/kyua.zDf9hw/2/work/atf-check.9XBKIW    2025-04-25 19:33:19.991158000 +0000
+++ /tmp/kyua.zDf9hw/2/work/check.wUoahY/stdout 2025-04-25 19:33:19.990816000 +0000
@@ -1 +1 @@
-? (198.51.100.2) at 02:a9:ae:d3:65:0b on epair0a expires in 1200 seconds [ethernet]
+? (198.51.100.2) at 02:a9:ae:d3:65:0b on epair0a expires in 1199 seconds [ethernet]

Solve this by adding 1 second tolerance

Test Plan

To add load, I’m using a sudo nice -5 stress-ng --matrix 0 -t 10y and running in parallel a : sudo nice -n 19 kyua test sys/netinet/arp:static.
Running in a loop the failure ratio was about 1/10.
With this patch, I didn’t reproduce this problem with 100 loops.

Diff Detail

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