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 159A49E3 for ; Thu, 30 Mar 2017 01:26:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490829979; x=1522365979; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=noXXFuIp4oXZ2Z2OZhXwDqXCrCuaoyoc556vjYvIaY8=; b=IVDDNvtw1Ce5epbdJKJ4kj4Rjh+VLwpyt7+lBoidtT2k3rxbDXZO+eCH ZKOH8e32/t64gYvOzy8fong431pAqQ==; Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Mar 2017 16:26:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,243,1486454400"; d="scan'208";a="82491181" Received: from silpixa00398672.ir.intel.com ([10.237.223.128]) by fmsmga006.fm.intel.com with ESMTP; 29 Mar 2017 16:26:17 -0700 From: Harry van Haaren To: dev@dpdk.org Cc: jerin.jacob@caviumnetworks.com, Harry van Haaren Date: Thu, 30 Mar 2017 00:25:44 +0100 Message-Id: <1490829963-106807-3-git-send-email-harry.van.haaren@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490829963-106807-1-git-send-email-harry.van.haaren@intel.com> References: <1490374395-149320-1-git-send-email-harry.van.haaren@intel.com> <1490829963-106807-1-git-send-email-harry.van.haaren@intel.com> Subject: [dpdk-dev] [PATCH v6 02/21] test/eventdev: pass timeout ticks unsupported X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Mar 2017 23:26:19 -0000 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 Acked-by: Jerin Jacob [1] http://dpdk.org/dev/patchwork/patch/21979/ --- v6: - Fix return value to "return ret" instead of -ENOTSUP (Jerin) --- 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..b568470 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 ret; } -- 2.7.4