From patchwork Fri Mar 24 16:52:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Van Haaren, Harry" X-Patchwork-Id: 22322 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id E234FCFC6; Fri, 24 Mar 2017 17:53:34 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 0F3DDCF9C for ; Fri, 24 Mar 2017 17:53:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490374395; x=1521910395; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=6+eHumAcY1oJee3mggEQGVKt3IYFa2o+2mTUutBKBjo=; b=wAluJz6RRmfjKfvOUCKg4PNWpz7pisFcKsvBY33r+RwAPsV7bx4suWKl HlR4Y6z/O2U+guL+RxW8Y18FmEPvQg==; Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Mar 2017 09:53:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,215,1486454400"; d="scan'208";a="70349071" Received: from silpixa00398672.ir.intel.com ([10.237.223.128]) by orsmga004.jf.intel.com with ESMTP; 24 Mar 2017 09:53:13 -0700 From: Harry van Haaren To: dev@dpdk.org Cc: jerin.jacob@caviumnetworks.com, Harry van Haaren Date: Fri, 24 Mar 2017 16:52:56 +0000 Message-Id: <1490374395-149320-2-git-send-email-harry.van.haaren@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490374395-149320-1-git-send-email-harry.van.haaren@intel.com> References: <489175012-101439-1-git-send-email-harry.van.haaren@intel.com> <1490374395-149320-1-git-send-email-harry.van.haaren@intel.com> Subject: [dpdk-dev] [PATCH v5 01/20] 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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/ Acked-by: Jerin Jacob --- 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; }