From patchwork Wed Jun 28 12:00:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 106518 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp926741qge; Wed, 28 Jun 2017 05:01:31 -0700 (PDT) X-Received: by 10.55.16.153 with SMTP id 25mr13058462qkq.45.1498651291128; Wed, 28 Jun 2017 05:01:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498651291; cv=none; d=google.com; s=arc-20160816; b=LBj/D1pCWaOz92/o/CX1UWRb+Hrube9g7MFt5ugeVKcUkAcShkP7aF/WkS0pKqYnBO t2nZzE8J1FNpljjxttu5lywaodrT/nBqhbjt1yzqd0Wbry/6Gi6ikHCVZzpEk2xVXvFU abUOLkDfbHnPp92X/fHCrWgeJuEMTaivlpOnpx2OMOq4go2K9TWNEb9T9hAd81m8wfSw EdO61ukgUn78TN634Gq04xjta/Jzwfc8qyJNXZiOZyXJ4zfX4y2eFD1kUIpsTgG7jIaO Hj4DmRhQ9xpg0kBD4vTlzrZMT84Pqkn76S74C9xVFHV4CYCK57w4R1btBLUd7SPYpiK/ O1VA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=LJ5X6wwBz++H/3jLoYmwRHqDV1NNNhjsgKS+pGPH/IQ=; b=WaEXBEt5vnGPLBGX5VbMzydyb2fsFR63Dbe8/k0Iw5x+GmvUqS/4RkMuK8STnkBq3B kQ7pNMQoTXcVXDfDn4bWm/sa07obq30sHMb9JFx0UMyzA4/ZdTLrw7IIWgiyRCnX+BgP +V07CvcId/X0/j67oAcgPJs2qr1ZaHyQKoq45sBremup6aDCWrjAc2wKfqAel0CuiBkB ZxzSAgC2GlDAqLRkkewQpWEmYLeoxstH1nD7SUd+qr7QRVenxwEhSubHE5mJ5ipAsdyR ouXUps3YXzE9yv/A7pQ001ZaEL73wk0SS7OT124zQlfhAmJbKYe+69ljqudhEA9Ih6cg nXNA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id i16si1744580qtf.90.2017.06.28.05.01.28; Wed, 28 Jun 2017 05:01:31 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 388E060D60; Wed, 28 Jun 2017 12:01:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id D970660B06; Wed, 28 Jun 2017 12:01:22 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 960FF60D5E; Wed, 28 Jun 2017 12:01:16 +0000 (UTC) Received: from forward5j.cmail.yandex.net (forward5j.cmail.yandex.net [5.255.227.23]) by lists.linaro.org (Postfix) with ESMTPS id AFF4660725 for ; Wed, 28 Jun 2017 12:00:45 +0000 (UTC) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b6:7]) by forward5j.cmail.yandex.net (Yandex) with ESMTP id 4014821B10 for ; Wed, 28 Jun 2017 15:00:44 +0300 (MSK) Received: from smtp2p.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp2p.mail.yandex.net (Yandex) with ESMTP id A99841A800C3 for ; Wed, 28 Jun 2017 15:00:38 +0300 (MSK) Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 64SuRfRMYQ-0bZux5gb; Wed, 28 Jun 2017 15:00:38 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Wed, 28 Jun 2017 15:00:14 +0300 Message-Id: <1498651214-13879-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1498651214-13879-1-git-send-email-odpbot@yandex.ru> References: <1498651214-13879-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 62 Subject: [lng-odp] [PATCH v1 1/1] test:queue:update order queue test for locks. X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Nikhil Agarwal Order queue test should reserve ordered locks only if ordered locks count is more than 1. Signed-off-by: Nikhil Agarwal --- /** Email created from pull request 62 (NikhilA-Linaro:master_queue_cunit) ** https://github.com/Linaro/odp/pull/62 ** Patch: https://github.com/Linaro/odp/pull/62.patch ** Base sha: c6a309f00f882fabe70fa535ebe8b765f6e9bd11 ** Merge commit sha: a9853ec77bddaa0660251912903b904a557f48ac **/ test/common_plat/validation/api/queue/queue.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/common_plat/validation/api/queue/queue.c b/test/common_plat/validation/api/queue/queue.c index 6a13c006..3a7753b9 100644 --- a/test/common_plat/validation/api/queue/queue.c +++ b/test/common_plat/validation/api/queue/queue.c @@ -262,6 +262,7 @@ void queue_test_info(void) const char *const nq_order = "test_q_order"; odp_queue_info_t info; odp_queue_param_t param; + odp_queue_capability_t capa; char q_plain_ctx[] = "test_q_plain context data"; char q_order_ctx[] = "test_q_order context data"; unsigned lock_count; @@ -274,13 +275,18 @@ void queue_test_info(void) CU_ASSERT(odp_queue_context_set(q_plain, q_plain_ctx, sizeof(q_plain_ctx)) == 0); + memset(&capa, 0, sizeof(odp_queue_capability_t)); + CU_ASSERT(odp_queue_capability(&capa) == 0); /* Create a scheduled ordered queue with explicitly set params */ odp_queue_param_init(¶m); param.type = ODP_QUEUE_TYPE_SCHED; param.sched.prio = ODP_SCHED_PRIO_NORMAL; param.sched.sync = ODP_SCHED_SYNC_ORDERED; param.sched.group = ODP_SCHED_GROUP_ALL; - param.sched.lock_count = 1; + if(capa.max_ordered_locks) + param.sched.lock_count = 1; + else + param.sched.lock_count = 0; param.context = q_order_ctx; q_order = odp_queue_create(nq_order, ¶m); CU_ASSERT(ODP_QUEUE_INVALID != q_order);