From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id AC88B2BC9; Tue, 17 Jul 2018 18:45:06 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jul 2018 09:45:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,366,1526367600"; d="scan'208";a="55706083" Received: from sivswdev02.ir.intel.com (HELO localhost.localdomain) ([10.237.217.46]) by fmsmga008.fm.intel.com with ESMTP; 17 Jul 2018 09:44:48 -0700 From: Reshma Pattan To: dev@dpdk.org Cc: anatoly.burakov@intel.com, jasvinder.singh@intel.com, bernard.iremonger@intel.com, stable@dpdk.org, Reshma Pattan Date: Tue, 17 Jul 2018 17:44:45 +0100 Message-Id: <1531845885-23432-1-git-send-email-reshma.pattan@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1531831199-9952-1-git-send-email-reshma.pattan@intel.com> References: <1531831199-9952-1-git-send-email-reshma.pattan@intel.com> Subject: [dpdk-stable] [PATCH v3] test: fix incorrect return types X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jul 2018 16:45:08 -0000 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 Reviewed-by: Anatoly Burakov --- 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