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 E1E86A0524 for ; Mon, 27 Jul 2020 12:16:35 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9CAF41C0C4; Mon, 27 Jul 2020 12:16:35 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id C8FD01C025; Mon, 27 Jul 2020 12:16:31 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 41D8530E; Mon, 27 Jul 2020 03:16:31 -0700 (PDT) Received: from net-arm-thunderx2-02.shanghai.arm.com (net-arm-thunderx2-02.shanghai.arm.com [10.169.210.119]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 254683F718; Mon, 27 Jul 2020 03:16:28 -0700 (PDT) From: Ruifeng Wang To: Cc: dev@dpdk.org, i.maximets@samsung.com, honnappa.nagarahalli@arm.com, nd@arm.com, Ruifeng Wang , stable@dpdk.org Date: Mon, 27 Jul 2020 18:16:08 +0800 Message-Id: <20200727101608.190809-1-ruifeng.wang@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200424074356.193204-1-ruifeng.wang@arm.com> References: <20200424074356.193204-1-ruifeng.wang@arm.com> Subject: [dpdk-stable] [PATCH v2] test/cycles: restore original delay function X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" test_delay_us_sleep registers sleep based delay for testing. This changes the default delay function of testing environment. It is not expected. Restore defalut 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 Reviewed-by: Gavin Hu --- 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; + 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); -- 2.17.1