All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] test/memcpy: reduce duration
@ 2025-10-31 11:43 Thomas Monjalon
  2025-10-31 11:48 ` Morten Brørup
  2026-09-03 21:26 ` Stephen Hemminger
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Monjalon @ 2025-10-31 11:43 UTC (permalink / raw)
  To: dev; +Cc: david.marchand, Tyler Retzlaff

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH 1/1] test/memcpy: reduce duration
  2025-10-31 11:43 [PATCH 1/1] test/memcpy: reduce duration Thomas Monjalon
@ 2025-10-31 11:48 ` Morten Brørup
  2026-09-03 21:26 ` Stephen Hemminger
  1 sibling, 0 replies; 3+ messages in thread
From: Morten Brørup @ 2025-10-31 11:48 UTC (permalink / raw)
  To: Thomas Monjalon, dev; +Cc: david.marchand, Tyler Retzlaff

> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> Sent: Friday, 31 October 2025 12.43
> 
> 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>
> ---

Seems reasonable.
Acked-by: Morten Brørup <mb@smartsharesystems.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] test/memcpy: reduce duration
  2025-10-31 11:43 [PATCH 1/1] test/memcpy: reduce duration Thomas Monjalon
  2025-10-31 11:48 ` Morten Brørup
@ 2026-09-03 21:26 ` Stephen Hemminger
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2026-09-03 21:26 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, david.marchand, Tyler Retzlaff

On Fri, 31 Oct 2025 12:43:09 +0100
Thomas Monjalon <thomas@monjalon.net> wrote:

> 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]);

This was fixed by later patch.

commit bc15681021d5588072f0635ccb9937d127c64b3d
Author: Stephen Hemminger <stephen@networkplumber.org>
Date:   Thu Feb 26 08:48:43 2026 -0800

    test/memcpy: reduce alignment offset coverage
    
    The memcpy test sweeps all 32x32 src/dst alignment offset pairs which
    causes it to timeout on slow emulated 32-bit build environments [1].
    
    Replace with a curated set of 7 offsets {0, 1, 7, 15, 16, 17, 31}
    that cover the interesting alignment boundaries. This reduces the
    iterations from 38912 to 1862 while covering the same code paths.
    
    [1] https://build.opensuse.org/package/live_build_log/home:bluca:dpdk/dpdk/Debian_Testing/i586
    
    Reported-by: Luca Boccassi <bluca@debian.org>
    Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-03 21:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-31 11:43 [PATCH 1/1] test/memcpy: reduce duration Thomas Monjalon
2025-10-31 11:48 ` Morten Brørup
2026-09-03 21:26 ` Stephen Hemminger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.