From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 36D84A053A;
	Mon, 27 Jul 2020 14:21:56 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 6E0F71BFE8;
	Mon, 27 Jul 2020 14:21:55 +0200 (CEST)
Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com
 [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id 8B88F1BFE2
 for <dev@dpdk.org>; Mon, 27 Jul 2020 14:21:53 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
 s=mimecast20190719; t=1595852513;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=iM58rRzH21JpCHscwyPftxpdQLMN2s0261Yd4RJiKFU=;
 b=ee7SVWCkfXsSEZvp/Jpl/qo0x5Jz0D1IV06zFhzr71GpgKFSu4SphHbtibv0+lukA3oV1Y
 3SIQJJHsXcFlLtT8T6Ua0cczUFG7v4CzV79ogS4Z0698FzHxNAMmLxyuX2lrBz133T6M++
 o9kY+JB4KblXrtNA1t2uNR++BNP7Zx0=
Received: from mail-vs1-f71.google.com (mail-vs1-f71.google.com
 [209.85.217.71]) (Using TLS) by relay.mimecast.com with ESMTP id
 us-mta-80-cCbKIUgmMlavY8flr9Sq5A-1; Mon, 27 Jul 2020 08:21:51 -0400
X-MC-Unique: cCbKIUgmMlavY8flr9Sq5A-1
Received: by mail-vs1-f71.google.com with SMTP id q10so1918902vsg.18
 for <dev@dpdk.org>; Mon, 27 Jul 2020 05:21:51 -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=iM58rRzH21JpCHscwyPftxpdQLMN2s0261Yd4RJiKFU=;
 b=do+BlPxETJF0MKQHC11EnLqLa5+ex+jqBd2samWVoQX9V9l8a+dZheDXH7h7U1W6jE
 XxesrkcRPkGbK3FAiQFBirXKwQzoD4Z/yDghiLAcyaNySniJsB9+xpI4ckZnfaFT0pSM
 Mzx97ciayD5isfQDzhj38w1Km8GWUJl/tYiYbgfLlHwPt50vQa2sdC7wN8Ggppti52df
 x3sWn40Fo3YReQEeBBWz4VQqxvQAt4r4IyKc4FCJ2nTHT+JJIhL48hvtz29WHoIf1o3k
 /s8MBRsmwSkusvFVdKgHTQPhY9+FBNxgRY3yGKp3Y6AHaFlpRRlvEgVpNOp4YEyXZXaY
 ZPmw==
X-Gm-Message-State: AOAM5306zML09CHPQ13udO2h3SGxmeWP1KyWvV+b+jigOcAIc/AQ7/y4
 v1x08VUy98lAew17QXGLBD+bbjJE25VRt45U1hVzMtDYKCdBNiVyZgRzFfPktt/CzAu2clcKr4y
 C32YjMzbcIigiXDy97nk=
X-Received: by 2002:a67:c58c:: with SMTP id h12mr16185834vsk.141.1595852511107; 
 Mon, 27 Jul 2020 05:21:51 -0700 (PDT)
X-Google-Smtp-Source: ABdhPJzZiKFPL6M3EdMy4emWU8DhhaC6TftRRR215HN8gfRv4sLczcRkxaRG3Sg2dbiZph2xddxk/bnIjkAUbSKkZtQ=
X-Received: by 2002:a67:c58c:: with SMTP id h12mr16185820vsk.141.1595852510869; 
 Mon, 27 Jul 2020 05:21:50 -0700 (PDT)
MIME-Version: 1.0
References: <20200424074356.193204-1-ruifeng.wang@arm.com>
 <20200727102151.192516-1-ruifeng.wang@arm.com>
In-Reply-To: <20200727102151.192516-1-ruifeng.wang@arm.com>
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 27 Jul 2020 14:21:39 +0200
Message-ID: <CAJFAV8wSM9ni7HmnhDas36XM1kAGCap+rXKbg5vRsdo5LZ5xPg@mail.gmail.com>
To: Ruifeng Wang <ruifeng.wang@arm.com>
Cc: dev <dev@dpdk.org>, Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>,
 nd <nd@arm.com>, 
 dpdk stable <stable@dpdk.org>, Ilya Maximets <i.maximets@ovn.org>
Authentication-Results: relay.mimecast.com;
 auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset="UTF-8"
Subject: Re: [dpdk-dev] [PATCH v2] test/cycles: restore original delay
	function
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

On Mon, Jul 27, 2020 at 12:22 PM Ruifeng Wang <ruifeng.wang@arm.com> wrote:
>
> test_delay_us_sleep registers sleep based delay for testing.
> This changes the default delay function of testing environment.
> It is not expected.
>
> Restore default delay function after the test to fix the issue.
>
> Fixes: a51639cc720a ("eal: add nanosleep based delay function")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
> Reviewed-by: Gavin Hu <gavin.hu@arm.com>
> ---
> v2:
> Dropped other patches in the series that are not needed.
>
>  app/test/test_cycles.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/app/test/test_cycles.c b/app/test/test_cycles.c
> index c78e6a5b1..015a9290f 100644
> --- a/app/test/test_cycles.c
> +++ b/app/test/test_cycles.c
> @@ -79,8 +79,14 @@ REGISTER_TEST_COMMAND(cycles_autotest, test_cycles);
>  static int
>  test_delay_us_sleep(void)
>  {
> +       int rv = 0;

No initialisation needed, I removed it while applying.


> +
>         rte_delay_us_callback_register(rte_delay_us_sleep);
> -       return check_wait_one_second();
> +       rv = check_wait_one_second();
> +       /* restore original delay function */
> +       rte_delay_us_callback_register(rte_delay_us_block);
> +
> +       return rv;
>  }
>
>  REGISTER_TEST_COMMAND(delay_us_sleep_autotest, test_delay_us_sleep);

Reviewed-by: David Marchand <david.marchand@redhat.com>


Applied, thanks.


-- 
David Marchand