Skip to contentSkip to conversation

test/pcapng: add some leeway to timestamp test

PATCH Applied Stephen Hemminger 2 participants 2 messages Jul 1 – Jul 2

lore
Share & tools
lore
#0 lore raw

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.

---
 app/test/test_pcapng.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
app/test/test_pcapng.c +1 -1
index 298bcbd31f..d14ea84f0d 100644
@@ -440,7 +440,7 @@ valid_pcapng_file(const char *file_name, uint64_t started, unsigned int expected
 	int 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
#1 lore raw

02/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.

Applied, thanks.