DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	Reshma Pattan <reshma.pattan@intel.com>
Subject: [PATCH] test/pcapng: add some leeway to timestamp test
Date: Wed,  1 Jul 2026 15:37:02 -0700	[thread overview]
Message-ID: <20260701223702.105995-1-stephen@networkplumber.org> (raw)

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@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


             reply	other threads:[~2026-07-01 22:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-01 22:37 Stephen Hemminger [this message]
2026-07-02 21:08 ` [PATCH] test/pcapng: add some leeway to timestamp test Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260701223702.105995-1-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=reshma.pattan@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox