DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: david.marchand@redhat.com, Tyler Retzlaff <roretzla@linux.microsoft.com>
Subject: [PATCH 1/1] test/memcpy: reduce duration
Date: Fri, 31 Oct 2025 12:43:09 +0100	[thread overview]
Message-ID: <20251031114310.4062899-1-thomas@monjalon.net> (raw)

When running on limited platforms like GitHub Actions,
the functional unit test "memcpy_autotest"
may hit a timeout, especially when running with UBSan.

This change skips testing some alignment offsets (from 0 to 31).
It will test only every 3-byte offsets for the source buffer,
and every 2-byte offsets for the destination buffer.
So it is supposed to be 6x faster with a reasonably smaller coverage.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 app/test/test_memcpy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test/test_memcpy.c b/app/test/test_memcpy.c
index 802dc4631b..ea9e76e9ad 100644
--- a/app/test/test_memcpy.c
+++ b/app/test/test_memcpy.c
@@ -105,8 +105,8 @@ func_test(void)
 	unsigned int off_src, off_dst, i;
 	int ret;
 
-	for (off_src = 0; off_src < ALIGNMENT_UNIT; off_src++) {
-		for (off_dst = 0; off_dst < ALIGNMENT_UNIT; off_dst++) {
+	for (off_src = 0; off_src < ALIGNMENT_UNIT; off_src += 3) {
+		for (off_dst = 0; off_dst < ALIGNMENT_UNIT; off_dst += 2) {
 			for (i = 0; i < RTE_DIM(buf_sizes); i++) {
 				ret = test_single_memcpy(off_src, off_dst,
 				                         buf_sizes[i]);
-- 
2.51.0


             reply	other threads:[~2025-10-31 11:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-31 11:43 Thomas Monjalon [this message]
2025-10-31 11:48 ` Morten Brørup

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=20251031114310.4062899-1-thomas@monjalon.net \
    --to=thomas@monjalon.net \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=roretzla@linux.microsoft.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;
as well as URLs for NNTP newsgroup(s).