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 1FA93A00C2; Fri, 24 Apr 2020 09:44:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7C3221C1F2; Fri, 24 Apr 2020 09:44:25 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 0A73D1C1F2; Fri, 24 Apr 2020 09:44:24 +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 88D6231B; Fri, 24 Apr 2020 00:44:23 -0700 (PDT) Received: from net-arm-thunderx2-02.shanghai.arm.com (net-arm-thunderx2-02.shanghai.arm.com [10.169.41.165]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 79AC13F68F; Fri, 24 Apr 2020 00:44:20 -0700 (PDT) From: Ruifeng Wang To: aconole@redhat.com, maicolgabriel@hotmail.com Cc: dev@dpdk.org, gavin.hu@arm.com, honnappa.nagarahalli@arm.com, juraj.linkes@pantheon.tech, nd@arm.com, Ruifeng Wang , stable@dpdk.org Date: Fri, 24 Apr 2020 15:43:53 +0800 Message-Id: <20200424074356.193204-2-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-dev] [PATCH 1/4] 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" test_delay_us_sleep registers sleep based delay for testing. The change of default delay function is not expected. Restore defalut delay function 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 --- 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