From: Michael Santana <msantana@redhat.com>
To: dev <dev@dpdk.org>
Cc: Thomas Monjalon <thomas@monjalon.net>,
Michael Santana <msantana@redhat.com>
Subject: [dpdk-dev] [PATCH] test: skip test when cores do not meet requirement
Date: Mon, 3 Jun 2019 14:59:56 -0400 [thread overview]
Message-ID: <20190603185956.4560-1-msantana@redhat.com> (raw)
If the running platform does not meet the required 4 cores or more to run
tests rcu_qsbr_autotest and hash_readwrite_autotest meson reports them as
failed tests when they really should be skipped tests.
The working change can be shown here:
FAIL:
https://travis-ci.com/Maickii/dpdk-2/jobs/205045946#L645
https://travis-ci.com/Maickii/dpdk-2/jobs/205045946#L671
SKIP:
https://travis-ci.com/Maickii/dpdk-2/jobs/205047293#L645
https://travis-ci.com/Maickii/dpdk-2/jobs/205047293#L671
Signed-off-by: Michael Santana <msantana@redhat.com>
---
app/test/test_hash_readwrite.c | 2 +-
app/test/test_rcu_qsbr.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/test/test_hash_readwrite.c b/app/test/test_hash_readwrite.c
index 480ae97d8..a34193e98 100644
--- a/app/test/test_hash_readwrite.c
+++ b/app/test/test_hash_readwrite.c
@@ -621,7 +621,7 @@ test_hash_readwrite_main(void)
if (rte_lcore_count() <= 2) {
printf("More than two lcores are required "
"to do read write test\n");
- return -1;
+ return TEST_SKIPPED;
}
RTE_LCORE_FOREACH_SLAVE(core_id) {
diff --git a/app/test/test_rcu_qsbr.c b/app/test/test_rcu_qsbr.c
index 92ab0c20a..f3e02dd3f 100644
--- a/app/test/test_rcu_qsbr.c
+++ b/app/test/test_rcu_qsbr.c
@@ -953,8 +953,8 @@ test_rcu_qsbr_main(void)
return -1;
if (num_cores < 4) {
- printf("Test failed! Need 4 or more cores\n");
- goto test_fail;
+ printf("Test skipped! Need 4 or more cores\n");
+ return TEST_SKIPPED;
}
/* Error-checking test cases */
--
2.20.1
reply other threads:[~2019-06-03 19:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20190603185956.4560-1-msantana@redhat.com \
--to=msantana@redhat.com \
--cc=dev@dpdk.org \
--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).