From patchwork Fri Jun 30 07:00:49 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: 106677 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp1957060qge; Fri, 30 Jun 2017 00:01:54 -0700 (PDT) X-Received: by 10.200.9.104 with SMTP id z37mr26301871qth.102.1498806114404; Fri, 30 Jun 2017 00:01:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498806114; cv=none; d=google.com; s=arc-20160816; b=HPj61HpdCtKtNRqZLmEFrjWEJzcCvRmsgQwrv1AZKnDWqjpdiC4KJTaTSTJqBfWAg6 diXE2XURm49BFh0or6ZLZWOHiVjHo3r+zkFSk9ORmfDto6ZgvJTGlsomLQ9cYzbHGKfb yBEUaaRwvKyfdRmTCJIcCMucKLWqdktXs3IXellsNPlgTHo4LM0KEO4jyl0Uv/+XNbEH i5QxtPrcOzRVtY+/f7RT8gIJofEmBklkk8+qXJbs0JkRqhjyzIxF1Azq7TF9kzhHw5S0 oIUTWaJC92YZJxe2Ol1c3LlpH6KCYVcN8kicYzgiZn1DFjFbAZ1Ji0hHkYYkm1HriWVV /rcg== 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=sTr2qQYtAnjmOu9CNTV3Y7TwrYI33OE3+cVRLT5N8hE=; b=PxGKRZmTQs1oUbChsMt1dPHc3pWUqii+7RYmXsAd1o9qYyhsGHQGSk3GNTFKCMkG9n Cted5HrJ8ytb6ABpUQ5zZXCDJIyQiiiRevHNRk+6bG6/aB1YrpzmPGi2jYlHh24z7grC ZAU9BnugAwOV4YI3Gd2UGCkBa7Cj2mMCRcqPay2PjbStD9Pe/tm3TN6u0GlQ15zayQci 1ga68i8VwwbvFurjIYunPf3yPWetraT2alT06sSbWYbxuGhlKhpS6Am+udHu/u0Mj94T pP4rO5c5WYs6JmiwRS4rGrjYpIuGRwZclqYA7SLh93jAkz4ERR+yH3VKDfIDAkzSgtKn iMKQ== 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 p68si6791633qkb.237.2017.06.30.00.01.54; Fri, 30 Jun 2017 00:01:54 -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 ED9BD60C61; Fri, 30 Jun 2017 07:01:53 +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,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 12FCC606A8; Fri, 30 Jun 2017 07:01:30 +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 D875960C51; Fri, 30 Jun 2017 07:01:25 +0000 (UTC) Received: from forward5p.cmail.yandex.net (forward5p.cmail.yandex.net [77.88.31.20]) by lists.linaro.org (Postfix) with ESMTPS id 15617606A7 for ; Fri, 30 Jun 2017 07:01:24 +0000 (UTC) Received: from smtp1o.mail.yandex.net (smtp1o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::25]) by forward5p.cmail.yandex.net (Yandex) with ESMTP id 014D720FA2 for ; Fri, 30 Jun 2017 10:01:22 +0300 (MSK) Received: from smtp1o.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp1o.mail.yandex.net (Yandex) with ESMTP id C6E3413009F1 for ; Fri, 30 Jun 2017 10:01:21 +0300 (MSK) Received: by smtp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id ohLcYx0OOQ-1K6CoD87; Fri, 30 Jun 2017 10:01:20 +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: Fri, 30 Jun 2017 10:00:49 +0300 Message-Id: <1498806049-2253-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1498806049-2253-1-git-send-email-odpbot@yandex.ru> References: <1498806049-2253-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 62 Subject: [lng-odp] [PATCH v3 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: 9b78da8e2373ab0530cfbbd72b2229059b57ddf1 ** Merge commit sha: 3e797d63f91109bdb3c4749ecf96b6b1363bde68 **/ 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..f08d811f 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 capability; 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(&capability, 0, sizeof(odp_queue_capability_t)); + CU_ASSERT(odp_queue_capability(&capability) == 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 (capability.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);