From patchwork Wed Dec 2 12:05:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 57555 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp2826472lbb; Wed, 2 Dec 2015 04:05:38 -0800 (PST) X-Received: by 10.140.161.137 with SMTP id h131mr3544962qhh.57.1449057938735; Wed, 02 Dec 2015 04:05:38 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id v83si3047996qhv.85.2015.12.02.04.05.38; Wed, 02 Dec 2015 04:05:38 -0800 (PST) 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; dkim=neutral (body hash did not verify) header.i=@linaro-org.20150623.gappssmtp.com Received: by lists.linaro.org (Postfix, from userid 109) id 2FEF962007; Wed, 2 Dec 2015 12:05:38 +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.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID, 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 8430561FE7; Wed, 2 Dec 2015 12:05:33 +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 EC25261FF5; Wed, 2 Dec 2015 12:05:30 +0000 (UTC) Received: from mail-ob0-f178.google.com (mail-ob0-f178.google.com [209.85.214.178]) by lists.linaro.org (Postfix) with ESMTPS id 4792B61FD3 for ; Wed, 2 Dec 2015 12:05:29 +0000 (UTC) Received: by obbbj7 with SMTP id bj7so30627225obb.1 for ; Wed, 02 Dec 2015 04:05:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=bAHj1wcwmFrp8FDa08UPCU1dXVNbzxR6Nj+ONpK7hTw=; b=EReTYvzvhcLyeW/tUqiRbymjoGUiIryRVYqQ/EkloUYSxCBcD0PL8naXRuYHL9Ggfp cBpFs1ezpi/SiFLzUsryBHvLH7gGonYo52O+Hx8+/swmQUZ9lAa/EQP3nSC+ZNpSOs1A if3w96NwUtOYmzAPKvslzNBmRpr75GMyZqSk5u7Vg/EcNZ/3d/JNg/q9D1tgeRxMmRIV Qqu+1G69PAK0NoWnv20V9krtntXgauY9UUM2C0ZT6lmMRf+YneJvt07/ZhAXNcK7zTwN d0f6F5NxnRzR4oEosQdAqrB6nc0skR+bceFgAjRp6uVzGP3CkgKreCew4VNpaKdBV24x z0tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=bAHj1wcwmFrp8FDa08UPCU1dXVNbzxR6Nj+ONpK7hTw=; b=HugBS57vovBvYcp0XKDd6pL7tY9EiVfL974gYaXJ4TvQulrhuzTSVlFjvPR5Pg63fT LxoY89eO5dHiXl33b1sZ3NmfReefVMYf8HHkoiheYY6rQf56bOn4UHSW03Y6cAn6dR2K kyHhJacC+VQ1DIYrlg+sL4j9q5+OgPS0xc+454Rp098oPL5l96gHDoG9z35mto+fUYXP t5Mx3O5+yxBadX/3AqTXYHNifz3VltI/gg6l+y0ESnFMN+W9gsOZC8w6TY27Lh7QAYRc KqdKO0m5HtCblWs4HQfPAaMCYDD+35fIFwEmJM0/65mwL5wn1IVnXL2nZXquwoOoeEE7 fHfQ== X-Gm-Message-State: ALoCoQlpN0MX1t4vnbtDRt9fmi4gmJiFEfNUmjFLmAwR4WqVNtupxZWFMBAs19Q3YhsaoECk29iI X-Received: by 10.60.51.70 with SMTP id i6mr2344849oeo.3.1449057928771; Wed, 02 Dec 2015 04:05:28 -0800 (PST) Received: from Ubuntu15.localdomain (cpe-66-68-129-43.austin.res.rr.com. [66.68.129.43]) by smtp.gmail.com with ESMTPSA id i8sm1151898obt.3.2015.12.02.04.05.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 02 Dec 2015 04:05:28 -0800 (PST) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Wed, 2 Dec 2015 06:05:23 -0600 Message-Id: <1449057923-27117-1-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.4 X-Topics: patch Subject: [lng-odp] [PATCH] validation: queue: refactor test to avoid coverity issues 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: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Change CU_ASSERT order to avoid side effect issues identified by Coverity Signed-off-by: Bill Fischofer Reviewed-by: Ivan Khoronzhuk --- test/validation/queue/queue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/validation/queue/queue.c b/test/validation/queue/queue.c index 3b522c9..3c1c64a 100644 --- a/test/validation/queue/queue.c +++ b/test/validation/queue/queue.c @@ -173,7 +173,8 @@ void queue_test_info(void) CU_ASSERT(info.param.sched.prio == odp_queue_sched_prio(q_order)); CU_ASSERT(info.param.sched.sync == odp_queue_sched_type(q_order)); CU_ASSERT(info.param.sched.group == odp_queue_sched_group(q_order)); - CU_ASSERT(ret = odp_queue_lock_count(q_order) >= 0); + ret = odp_queue_lock_count(q_order); + CU_ASSERT(ret >= 0); lock_count = (unsigned) ret; CU_ASSERT(info.param.sched.lock_count == lock_count);