From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: Re: [PATCH v5 01/20] test/eventdev: pass timeout ticks unsupported Date: Sat, 25 Mar 2017 11:08:19 +0530 Message-ID: <20170325053818.jzp5m6hj4sahr5bs@localhost.localdomain> References: <489175012-101439-1-git-send-email-harry.van.haaren@intel.com> <1490374395-149320-1-git-send-email-harry.van.haaren@intel.com> <1490374395-149320-2-git-send-email-harry.van.haaren@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org To: Harry van Haaren Return-path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0052.outbound.protection.outlook.com [104.47.37.52]) by dpdk.org (Postfix) with ESMTP id D11FDD267 for ; Sat, 25 Mar 2017 06:38:37 +0100 (CET) Content-Disposition: inline In-Reply-To: <1490374395-149320-2-git-send-email-harry.van.haaren@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Mar 24, 2017 at 04:52:56PM +0000, Harry van Haaren wrote: > This commit reworks the return value handling of the > timeout ticks test. This feature is not mandatory for > a pmd, the eventdev layer returns -ENOTSUP if the PMD > doesn't implement the function. > > The test is modified to check if the return value is > -ENOTSUP, and return -ENOTSUP to the test framework, > which can handle "unsupported" tests since patch[1]. > > As such, this test will function correctly if the > patchset linked below is applied, it fails if the > patch is not applied and the PMD doesn't the timeout > ticks function. > > Note it does not depend (as a compile time dependency) > on the patchset linked below. > > Signed-off-by: Harry van Haaren > > [1] http://dpdk.org/dev/patchwork/patch/21979/ > --- > test/test/test_eventdev.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/test/test/test_eventdev.c b/test/test/test_eventdev.c > index 0f1deb6..7067970 100644 > --- a/test/test/test_eventdev.c > +++ b/test/test/test_eventdev.c > @@ -519,9 +519,10 @@ test_eventdev_timeout_ticks(void) > uint64_t timeout_ticks; > > ret = rte_event_dequeue_timeout_ticks(TEST_DEV_ID, 100, &timeout_ticks); > - TEST_ASSERT_SUCCESS(ret, "Fail to get timeout_ticks"); > + if (ret != -ENOTSUP) > + TEST_ASSERT_SUCCESS(ret, "Fail to get timeout_ticks"); > > - return TEST_SUCCESS; > + return -ENOTSUP; It should be "return ret". Otherwise, The test case will return -ENOTSUP irrespective of PMD supports or not. With that change, Acked-by: Jerin Jacob > } > > > -- > 2.7.4 >