[1/4] test/cycles: restore original delay function

Message ID 20200424074356.193204-2-ruifeng.wang@arm.com (mailing list archive)
State Superseded, archived
Delegated to: David Marchand
Headers
Series arm64 CI stabilize |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing fail Testing issues
ci/Intel-compilation success Compilation OK

Commit Message

Ruifeng Wang April 24, 2020, 7:43 a.m. UTC
  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 <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
---
 app/test/test_cycles.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
  

Patch

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);