From: Reshma Pattan <reshma.pattan@intel.com>
To: dev@dpdk.org
Cc: anatoly.burakov@intel.com, jasvinder.singh@intel.com,
bernard.iremonger@intel.com, stable@dpdk.org,
Reshma Pattan <reshma.pattan@intel.com>
Subject: [dpdk-stable] [PATCH v3] test: fix incorrect return types
Date: Tue, 17 Jul 2018 17:44:45 +0100 [thread overview]
Message-ID: <1531845885-23432-1-git-send-email-reshma.pattan@intel.com> (raw)
In-Reply-To: <1531831199-9952-1-git-send-email-reshma.pattan@intel.com>
UTs should return either TEST_SUCCESS or TEST_FAILED only.
They should not return 0, -1 and any other value.
Fixes: 9c9befea4f ("test: add flow classify unit tests")
CC: jasvinder.singh@intel.com
CC: bernard.iremonger@intel.com
CC: stable@dpdk.org
Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
v3: remove return of TEST_SUCESS and TEST_FAILED from
unnecessary places.
---
---
test/test/test_flow_classify.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/test/test/test_flow_classify.c b/test/test/test_flow_classify.c
index fc83b69ae..5f5beeee7 100644
--- a/test/test/test_flow_classify.c
+++ b/test/test/test_flow_classify.c
@@ -871,32 +871,32 @@ test_flow_classify(void)
printf("Line %i: f_create has failed!\n", __LINE__);
rte_flow_classifier_free(cls->cls);
rte_free(cls);
- return -1;
+ return TEST_FAILED;
}
printf("Created table_acl for for IPv4 five tuple packets\n");
ret = init_mbufpool();
if (ret) {
printf("Line %i: init_mbufpool has failed!\n", __LINE__);
- return -1;
+ return TEST_FAILED;
}
if (test_invalid_parameters() < 0)
- return -1;
+ return TEST_FAILED;
if (test_valid_parameters() < 0)
- return -1;
+ return TEST_FAILED;
if (test_invalid_patterns() < 0)
- return -1;
+ return TEST_FAILED;
if (test_invalid_actions() < 0)
- return -1;
+ return TEST_FAILED;
if (test_query_udp() < 0)
- return -1;
+ return TEST_FAILED;
if (test_query_tcp() < 0)
- return -1;
+ return TEST_FAILED;
if (test_query_sctp() < 0)
- return -1;
+ return TEST_FAILED;
- return 0;
+ return TEST_SUCCESS;
}
REGISTER_TEST_COMMAND(flow_classify_autotest, test_flow_classify);
--
2.14.4
next prev parent reply other threads:[~2018-07-17 16:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-16 16:58 [dpdk-stable] [PATCH] " Reshma Pattan
2018-07-17 9:28 ` [dpdk-stable] [dpdk-dev] " Burakov, Anatoly
2018-07-17 12:39 ` [dpdk-stable] [PATCH v2] " Reshma Pattan
2018-07-17 12:58 ` Burakov, Anatoly
2018-07-17 13:51 ` Pattan, Reshma
2018-07-17 16:44 ` Reshma Pattan [this message]
2018-07-26 19:41 ` [dpdk-stable] [dpdk-dev] [PATCH v3] " Thomas Monjalon
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=1531845885-23432-1-git-send-email-reshma.pattan@intel.com \
--to=reshma.pattan@intel.com \
--cc=anatoly.burakov@intel.com \
--cc=bernard.iremonger@intel.com \
--cc=dev@dpdk.org \
--cc=jasvinder.singh@intel.com \
--cc=stable@dpdk.org \
/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).