From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 93A7BA0096 for ; Tue, 4 Jun 2019 11:00:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B5C061BBE3; Tue, 4 Jun 2019 11:00:29 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 619E21BB65; Tue, 4 Jun 2019 11:00:28 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C87A33107B29; Tue, 4 Jun 2019 09:00:27 +0000 (UTC) Received: from dmarchan.remote.csb (ovpn-116-185.ams2.redhat.com [10.36.116.185]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9638D5DD6D; Tue, 4 Jun 2019 09:00:20 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, aconole@redhat.com, msantana@redhat.com, stable@dpdk.org, Yipeng Wang , Sameh Gobriel , Bruce Richardson , Pablo de Lara Date: Tue, 4 Jun 2019 10:59:42 +0200 Message-Id: <1559638792-8608-5-git-send-email-david.marchand@redhat.com> In-Reply-To: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> References: <1559638792-8608-1-git-send-email-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 04 Jun 2019 09:00:27 +0000 (UTC) Subject: [dpdk-dev] [PATCH 04/14] test/hash: fix off-by-one check on core count 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 subtest wants to start rwc_core_cnt[n] reader threads, while the master core is waiting for them to report. Fixes: c7eb0972e74b ("test/hash: add lock-free r/w concurrency") Cc: stable@dpdk.org Signed-off-by: David Marchand --- app/test/test_hash_readwrite_lf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test/test_hash_readwrite_lf.c b/app/test/test_hash_readwrite_lf.c index 343a338..f9f233a 100644 --- a/app/test/test_hash_readwrite_lf.c +++ b/app/test/test_hash_readwrite_lf.c @@ -939,7 +939,7 @@ struct { } for (n = 0; n < NUM_TEST; n++) { unsigned int tot_lcore = rte_lcore_count(); - if (tot_lcore < rwc_core_cnt[n]) + if (tot_lcore < rwc_core_cnt[n] + 1) goto finish; printf("\nNumber of readers: %u\n", rwc_core_cnt[n]); -- 1.8.3.1