Page MenuHomeFreeBSD

tests/arp: Add a 1-second tolerance
ClosedPublic

Authored by olivier on Apr 25 2025, 8:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 19, 2:09 AM
Unknown Object (File)
Thu, Nov 13, 6:05 PM
Unknown Object (File)
Thu, Nov 13, 1:08 PM
Unknown Object (File)
Mon, Nov 3, 5:49 AM
Unknown Object (File)
Sat, Nov 1, 12:24 AM
Unknown Object (File)
Wed, Oct 29, 10:40 AM
Unknown Object (File)
Wed, Oct 29, 10:25 AM
Unknown Object (File)
Wed, Oct 29, 10:22 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