From: Chengwen Feng <fengchengwen@huawei.com>
To: <thomas@monjalon.net>
Cc: <dev@dpdk.org>, <bruce.richardson@intel.com>, <kevin.laatz@intel.com>
Subject: [PATCH 1/2] test/dma: fix some testcase never fail
Date: Wed, 27 Aug 2025 09:28:28 +0800 [thread overview]
Message-ID: <20250827012829.40752-2-fengchengwen@huawei.com> (raw)
In-Reply-To: <20250827012829.40752-1-fengchengwen@huawei.com>
In the runtest() function, it will return error if the test return
value is less than 0.
But the 'copy' and 'error_handling' testcase may return 1 if failed
because its internal use or(||) operation.
This commit fix it by treating non-zero as error in runtest() function.
Fixes: 1b86a66a30c2 ("test/dma: add more comprehensive copy tests")
Fixes: 99d7ec4be237 ("test/dma: add failure handling tests")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
app/test/test_dmadev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c
index 9cbb9a6552..482d564f7a 100644
--- a/app/test/test_dmadev.c
+++ b/app/test/test_dmadev.c
@@ -92,7 +92,7 @@ runtest(const void *args)
printf("DMA Dev %d: Running %s Tests %s\n", dev_id, printable,
check_err_stats ? " " : "(errors expected)");
for (i = 0; i < iterations; i++) {
- if (test_fn(dev_id, vchan) < 0)
+ if (test_fn(dev_id, vchan) != 0)
return -1;
rte_dma_stats_get(dev_id, 0, &stats);
--
2.17.1
next prev parent reply other threads:[~2025-08-27 1:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-27 1:28 [PATCH 0/2] bugfix and enhance for DMA test Chengwen Feng
2025-08-27 1:28 ` Chengwen Feng [this message]
2025-08-27 1:28 ` [PATCH 2/2] test/dma: support auto adapt ringsize Chengwen Feng
2025-08-27 7:36 ` Bruce Richardson
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=20250827012829.40752-2-fengchengwen@huawei.com \
--to=fengchengwen@huawei.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=kevin.laatz@intel.com \
--cc=thomas@monjalon.net \
/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).