From patchwork Wed Jun 28 13:00:06 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: 106528 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp984450qge; Wed, 28 Jun 2017 06:00:46 -0700 (PDT) X-Received: by 10.200.52.242 with SMTP id x47mr13269689qtb.70.1498654846274; Wed, 28 Jun 2017 06:00:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498654846; cv=none; d=google.com; s=arc-20160816; b=t5Ph9j7BzjGCNGNfJ+JokTCul0Af5gnj8PvfoQV6RaKHqGSkYoQQsDz2N+azQxgluz HXgSZdBebyoWoJ7XPR/CFu3iOKd1zqdGc6aREKjSu1m1x2TSIti+EzmgqMnRXeAeFRb0 +IMPJAfprJ+3bIq3yBUBQhK1Ym5X8xwO4qKQEnCwb+q8FDr4Hgh/6jK2STuLHkCIMnca APYhSknSqeWnt0YtwgJS2rVUNCbHktg/UOYZniHnRRchm+ao8jXr65IYnHW1kRj47cL+ xd+mJQN5mV/OUV8uLzeMN8yu0AJ4MVj4At8dEQglj8P+Kr1AEj6/ALQFmvbtPW0pqviO u9wQ== 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=s0JUx8krTbSH58Br/fl2uN6s6xGJwuPepKeJcfcwL2E=; b=QiMwsobQAxhKx3PB5MESwIX4aSSc6uKjGWX6Bo4qqgHvva8wG0zRmobeT8IW86tKiS vQI16rDH/TNrwNkddUB4RSLhk+p1sMpj1qW4ek8Ccf3Th0rIkOvY9aYpgn7PRAlV8iKv TbgBYli1RFrVGF559rYXzBFaLB4/YoLQgN00i0WsQQXRy71sMJLoNJHZKGmgTB8tFmYN hsVv9UVLzYrUt/uzCeakQQaA3VZ0yY3Dbum3ljHEB00V1kBNZU430U2udMqfJDuX/+By Di9hFdjBkwEFvFCn8UQzNQuKYi1DZXQaWhRjrcPnjiAVwNwS+GTgFSzSs1ywhYYgPqq2 Qq5w== 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 21si1962590qke.235.2017.06.28.06.00.45; Wed, 28 Jun 2017 06:00:46 -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 2F9B260D7A; Wed, 28 Jun 2017 13:00:45 +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 EFC1260BFA; Wed, 28 Jun 2017 13:00:40 +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 A59E7607E5; Wed, 28 Jun 2017 13:00:33 +0000 (UTC) Received: from forward1h.cmail.yandex.net (forward1h.cmail.yandex.net [87.250.230.16]) by lists.linaro.org (Postfix) with ESMTPS id 8CD836068C for ; Wed, 28 Jun 2017 13:00:32 +0000 (UTC) Received: from smtp2m.mail.yandex.net (smtp2m.mail.yandex.net [77.88.61.129]) by forward1h.cmail.yandex.net (Yandex) with ESMTP id 2C4F021972 for ; Wed, 28 Jun 2017 16:00:31 +0300 (MSK) Received: from smtp2m.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp2m.mail.yandex.net (Yandex) with ESMTP id F16EC2300E2F for ; Wed, 28 Jun 2017 16:00:30 +0300 (MSK) Received: by smtp2m.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id ZNcEy0USP1-0U1eP0Sm; Wed, 28 Jun 2017 16:00:30 +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 16:00:06 +0300 Message-Id: <1498654806-14470-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1498654806-14470-1-git-send-email-odpbot@yandex.ru> References: <1498654806-14470-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 62 Subject: [lng-odp] [PATCH v2 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: b6a00978dc371ea769372144e584ca49785725fa **/ 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..663b7759 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);