From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0D49BA00E6 for ; Thu, 8 Aug 2019 08:58:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E4050231E; Thu, 8 Aug 2019 08:58:19 +0200 (CEST) Received: from mail-vk1-f196.google.com (mail-vk1-f196.google.com [209.85.221.196]) by dpdk.org (Postfix) with ESMTP id 6AD522082 for ; Thu, 8 Aug 2019 08:58:18 +0200 (CEST) Received: by mail-vk1-f196.google.com with SMTP id b69so18567115vkb.3 for ; Wed, 07 Aug 2019 23:58:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RLT3PvGi5phTzKpGGaLfstSqVM53DpkBlPKsb08979Y=; b=cf312lLGUhRfIrtb+tW7q+s5qEapeqgSeyfHXl+1VVXs7AfR5EejrDjnotquQ7Cv+J HvXbQuYnHkb5vRYDYcH6GckI/L0ZkDo7J1oQqqp7qp7kVTPvQI67n16luGNu9+bqtpRt DRLQ/Ruvh7z19fQRfNMpPY8xDdF2FDVx3H8okiJ2YgkKco8/IzINJoUM87OwgVYLFGNB IpEBJY7R64S648/zDkzMFdRSlwcQdpwvEkEwYBpMCZDxBzRh2fPvU9YNdmW/XqnFjWsa Eisg0fdVw3TFezTH74+g8f38xwUMRXGaeSeC/vvHK30e7SvqxXmnANhQH+Y1qnTfsqpQ l4PQ== X-Gm-Message-State: APjAAAV0aYXws2vSCBPcPPlqEeh4zzmHjD4KIibQTnggEOMCoN2DceWI LsBQeZ8IvaG2DYngS/+N5HkX5QJtfUi6mn0IJIxOUA== X-Google-Smtp-Source: APXvYqzc64WN17If3sQ2z6yr3gs4jocopo5fhQBd+C20pPYugcgqAPZXGsvzws6u6SCobrXIjgpZDTb7mm5MPOhbbQw= X-Received: by 2002:a1f:1185:: with SMTP id 127mr5050818vkr.85.1565247497427; Wed, 07 Aug 2019 23:58:17 -0700 (PDT) MIME-Version: 1.0 References: <20190807145844.23670-1-aconole@redhat.com> In-Reply-To: <20190807145844.23670-1-aconole@redhat.com> From: David Marchand Date: Thu, 8 Aug 2019 08:58:06 +0200 Message-ID: To: Aaron Conole Cc: dev , Phil Yang , Gavin Hu , Honnappa Nagarahalli Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] test/mcslock: wait for lcore completion 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" On Wed, Aug 7, 2019 at 4:58 PM Aaron Conole wrote: > > It's possible that the mcsunlock occurs before the test_mcslock_try has > a chance to execute, which will result in the trylock being successful, > making the test case fail. Fix this by waiting until all lcores have > completed their test before unlocking the master lock. > > Fixes: 32dcb9fd2a22 ("test/mcslock: add MCS queued lock unit test") > Cc: Phil Yang > Cc: Gavin Hu > Cc: Honnappa Nagarahalli > Signed-off-by: Aaron Conole > --- > app/test/test_mcslock.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/app/test/test_mcslock.c b/app/test/test_mcslock.c > index ed384b81d..e9359df2e 100644 > --- a/app/test/test_mcslock.c > +++ b/app/test/test_mcslock.c > @@ -225,8 +225,8 @@ test_mcslock(void) > RTE_LCORE_FOREACH_SLAVE(i) { > rte_eal_remote_launch(test_mcslock_try, NULL, i); > } > - rte_mcslock_unlock(&p_ml_try, &ml_try_me); > rte_eal_mp_wait_lcore(); > + rte_mcslock_unlock(&p_ml_try, &ml_try_me); > > /* Test is_locked API */ > if (rte_mcslock_is_locked(p_ml)) { > -- > 2.21.0 > Reviewed-by: David Marchand Thanks. -- David Marchand