[PATCH] test/pcapng: add some leeway to timestamp test
Stephen Hemminger
stephen at networkplumber.org
Thu Jul 2 00:37:02 CEST 2026
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 <stephen at networkplumber.org>
---
app/test/test_pcapng.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test/test_pcapng.c b/app/test/test_pcapng.c
index 298bcbd31f..d14ea84f0d 100644
--- a/app/test/test_pcapng.c
+++ b/app/test/test_pcapng.c
@@ -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,
--
2.53.0
More information about the dev
mailing list