test/pcapng: add some leeway to timestamp test
PATCH 1/1 test/pcapng: add some leeway to timestamp test
The timestamp test sometimes fails on busy or emulated CPU's add additional slop to allow timestamp to be up to 1 second after capture was stopped.
Signed-off-by Stephen Hemminger <[email protected]>
--- app/test/test_pcapng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
app/test/test_pcapng.c +1 -1
@@ -440,7 +440,7 @@ valid_pcapng_file(const char *file_name, uint64_t started, unsigned int expectedint ret; ctx.start_ns = started; - ctx.end_ns =current_timestamp (); + ctx.end_ns =current_timestamp () +NS_PER_S ; ctx.pcap = pcap_open_offline_with_tstamp_precision(file_name, PCAP_TSTAMP_PRECISION_NANO,
Signature · 1 line
2.53.0
Thomas Monjalon
Applied02/07/2026 00:37, Stephen Hemminger:
Quoted 5 lines
The timestamp test sometimes fails on busy or emulated CPU's add additional slop to allow timestamp to be up to 1 second after capture was stopped.
Signed-off-by Stephen Hemminger <[email protected]>
Applied, thanks.