From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
To: <dev@dpdk.org>
Cc: <anoobj@marvell.com>, Chengwen Feng <fengchengwen@huawei.com>,
"Vamsi Attunuru" <vattunuru@marvell.com>,
Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
Subject: [PATCH] test/dma: add test skip status
Date: Thu, 10 Aug 2023 17:29:33 +0530 [thread overview]
Message-ID: <20230810115933.2164-1-gmuthukrishn@marvell.com> (raw)
Add status on skipped tests.
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
---
app/test/test_dmadev_api.c | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/app/test/test_dmadev_api.c b/app/test/test_dmadev_api.c
index 4a181af90a..a1646472b0 100644
--- a/app/test/test_dmadev_api.c
+++ b/app/test/test_dmadev_api.c
@@ -9,6 +9,8 @@
#include <rte_test.h>
#include <rte_dmadev.h>
+#include "test.h"
+
extern int test_dma_api(uint16_t dev_id);
#define DMA_TEST_API_RUN(test) \
@@ -17,9 +19,6 @@ extern int test_dma_api(uint16_t dev_id);
#define TEST_MEMCPY_SIZE 1024
#define TEST_WAIT_US_VAL 50000
-#define TEST_SUCCESS 0
-#define TEST_FAILED -1
-
static int16_t test_dev_id;
static int16_t invalid_dev_id;
@@ -29,6 +28,7 @@ static char *dst;
static int total;
static int passed;
static int failed;
+static int skipped;
static int
testsuite_setup(int16_t dev_id)
@@ -49,6 +49,7 @@ testsuite_setup(int16_t dev_id)
total = 0;
passed = 0;
failed = 0;
+ skipped = 0;
/* Set dmadev log level to critical to suppress unnecessary output
* during API tests.
@@ -78,12 +79,22 @@ testsuite_run_test(int (*test)(void), const char *name)
if (test) {
ret = test();
- if (ret < 0) {
- failed++;
- printf("%s Failed\n", name);
- } else {
+ switch (ret) {
+ case TEST_SUCCESS:
passed++;
printf("%s Passed\n", name);
+ break;
+ case TEST_FAILED:
+ failed++;
+ printf("%s Failed\n", name);
+ break;
+ case TEST_SKIPPED:
+ skipped++;
+ printf("%s Skipped\n", name);
+ break;
+ default:
+ printf("Invalid test status\n");
+ break;
}
}
@@ -566,6 +577,7 @@ test_dma_api(uint16_t dev_id)
printf("Total tests : %d\n", total);
printf("Passed : %d\n", passed);
printf("Failed : %d\n", failed);
+ printf("Skipped : %d\n", skipped);
if (failed)
return -1;
--
2.25.1
next reply other threads:[~2023-08-10 11:59 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-10 11:59 Gowrishankar Muthukrishnan [this message]
2023-08-10 12:36 ` [PATCH v2 0/3] test/dma: add vchan reconfig and SG tests Gowrishankar Muthukrishnan
2023-08-10 12:36 ` [PATCH v2 1/3] test/dma: add test skip status Gowrishankar Muthukrishnan
2023-08-10 12:36 ` [PATCH v2 2/3] test/dma: test vchan reconfiguration Gowrishankar Muthukrishnan
2023-08-10 12:36 ` [PATCH v2 3/3] test/dma: add SG copy tests Gowrishankar Muthukrishnan
2023-11-03 15:38 ` [PATCH v3 0/3] test/dma: add vchan reconfig and SG tests Gowrishankar Muthukrishnan
2023-11-03 15:38 ` [PATCH v3 1/3] test/dma: use unit test framework Gowrishankar Muthukrishnan
2023-11-06 3:47 ` fengchengwen
2023-11-13 9:28 ` [EXT] " Gowrishankar Muthukrishnan
2023-11-03 15:38 ` [PATCH v3 2/3] test/dma: test vchan reconfiguration Gowrishankar Muthukrishnan
2023-11-06 4:06 ` fengchengwen
2023-11-03 15:38 ` [PATCH v3 3/3] test/dma: add SG copy tests Gowrishankar Muthukrishnan
2023-11-06 6:43 ` fengchengwen
2023-11-13 9:27 ` [EXT] " Gowrishankar Muthukrishnan
2023-11-13 12:53 ` [PATCH v4 0/3] test/dma: add vchan reconfig and SG tests Gowrishankar Muthukrishnan
2023-11-13 12:53 ` [PATCH v4 1/3] test/dma: use unit test framework Gowrishankar Muthukrishnan
2023-11-13 12:53 ` [PATCH v4 2/3] test/dma: test multiple vchan Gowrishankar Muthukrishnan
2023-11-13 12:53 ` [PATCH v4 3/3] test/dma: add SG copy tests Gowrishankar Muthukrishnan
2023-11-16 7:16 ` [PATCH v4 0/3] test/dma: add vchan reconfig and SG tests fengchengwen
2023-11-16 10:40 ` [PATCH v5 " Gowrishankar Muthukrishnan
2023-11-16 10:40 ` [PATCH v5 1/3] test/dma: use unit test framework Gowrishankar Muthukrishnan
2023-11-16 10:40 ` [PATCH v5 2/3] test/dma: test multiple vchan Gowrishankar Muthukrishnan
2023-11-16 10:40 ` [PATCH v5 3/3] test/dma: add SG copy tests Gowrishankar Muthukrishnan
2023-11-16 10:59 ` [PATCH v6 0/3] test/dma: add vchan reconfig and SG tests Gowrishankar Muthukrishnan
2023-11-16 10:59 ` [PATCH v6 1/3] test/dma: use unit test framework Gowrishankar Muthukrishnan
2023-11-16 10:59 ` [PATCH v6 2/3] test/dma: test multiple vchan Gowrishankar Muthukrishnan
2023-11-16 10:59 ` [PATCH v6 3/3] test/dma: add SG copy tests Gowrishankar Muthukrishnan
2023-11-16 13:27 ` [PATCH v7 0/3] test/dma: add vchan reconfig and SG tests Gowrishankar Muthukrishnan
2023-11-16 13:27 ` [PATCH v7 1/3] test/dma: use unit test framework Gowrishankar Muthukrishnan
2023-11-16 13:27 ` [PATCH v7 2/3] test/dma: test multiple vchan Gowrishankar Muthukrishnan
2023-11-16 13:27 ` [PATCH v7 3/3] test/dma: add SG copy tests Gowrishankar Muthukrishnan
2023-11-16 17:45 ` [PATCH v8 0/3] test/dma: add vchan reconfig and SG tests Gowrishankar Muthukrishnan
2023-11-16 17:45 ` [PATCH v8 1/3] test/dma: use unit test framework Gowrishankar Muthukrishnan
2023-11-16 17:45 ` [PATCH v8 2/3] test/dma: test multiple vchan Gowrishankar Muthukrishnan
2023-11-16 17:45 ` [PATCH v8 3/3] test/dma: add SG copy tests Gowrishankar Muthukrishnan
2023-12-07 10:10 ` [PATCH v8 0/3] test/dma: add vchan reconfig and SG tests Gowrishankar Muthukrishnan
2024-02-05 10:34 ` Gowrishankar Muthukrishnan
2024-03-06 19:45 ` Thomas Monjalon
2023-10-08 1:51 ` [PATCH] test/dma: add test skip status fengchengwen
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=20230810115933.2164-1-gmuthukrishn@marvell.com \
--to=gmuthukrishn@marvell.com \
--cc=anoobj@marvell.com \
--cc=dev@dpdk.org \
--cc=fengchengwen@huawei.com \
--cc=vattunuru@marvell.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).