arm64 CI stabilize
cover arm64 CI stabilize
arm64 Travis CI uses container environment.
Because performance of the environment has fluctuation, false positive failures and time outs happened from time to time. This patch series relax test criteria to stablize test result.
Ruifeng Wang (4):
test/cycles: restore original delay function test/cycles: increase threshold for containers on aarch64
ci: expose test time out argument
ci: increase time out multiplier for containers on aarch64
.ci/linux-build.sh | 3 ++- .travis.yml | 4 ++-- app/test/test_cycles.c | 15 ++++++++++++++- 3 files changed, 18 insertions(+), 4 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/4 test/cycles: restore original delay function
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.
--- app/test/test_cycles.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
app/test/test_cycles.c +7 -1
@@ -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);
Signature · 1 line
2.17.1
PATCH 2/4 test/cycles: increase threshold for containers on aarch64
In reply to Ruifeng Wangrte_delay_us_xxx could have more deviation than expected when system load is high. Test case failures were observed on Travis CI which run unit test in container for aarch64.
Use looser criteria for cycle tests on aarch64.
--- app/test/test_cycles.c | 7 +++++++ 1 file changed, 7 insertions(+)
app/test/test_cycles.c +7 -0
@@ -30,6 +30,13 @@ check_wait_one_second(void)uint64_t hz =rte_get_timer_hz ();uint64_t max_inc = (hz /100 );/* 10 ms max between 2 reads */ +#if defined(RTE_ARCH_ARM64 ) +/* When testing in containers, 'delay' could have less accuracy +* if system is busy. +*/ + max_inc =3 * max_inc; +#endif +/* check that waiting 1 second is precise */ prev_cycles =rte_get_timer_cycles ();rte_delay_us (1000000 );
Signature · 1 line
2.17.1
PATCH 3/4 ci: expose test time out argument
In reply to Ruifeng WangThe unit test time out setting was the same for jobs on different platforms. Due to difference of running environments, platforms could have different time out expecations.
Provide TIMEOUT_FACTOR as a knob to change the time out setting.
--- .ci/linux-build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
.ci/linux-build.sh +2 -1
@@ -96,5 +96,6 @@ if [ "$ABI_CHECKS" = "1" ]; then fi if [ "$RUN_TESTS" = "1" ]; then - sudo meson test -C build --suite fast-tests -t 3 + TIMEOUT_FACTOR=${TIMEOUT_FACTOR:-3} + sudo meson test -C build --suite fast-tests -t $TIMEOUT_FACTOR fi
Signature · 1 line
2.17.1
PATCH 4/4 ci: increase time out multiplier for containers on aarch64
In reply to Ruifeng Wangaarch64 jobs are running in containers. Tests may take longer time when system load is high.
Use bigger time out value for aarch64 test jobs to stabilize test result.
--- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
.travis.yml +2 -2
@@ -105,7 +105,7 @@ jobs: - env: DEF_LIB="static" arch: arm64 compiler: gcc - - env: DEF_LIB="shared" RUN_TESTS=1 + - env: DEF_LIB="shared" RUN_TESTS=1 TIMEOUT_FACTOR=9 arch: arm64 compiler: gcc - env: DEF_LIB="shared" BUILD_DOCS=1
@@ -128,6 +128,6 @@ jobs: - env: DEF_LIB="static" arch: arm64 compiler: clang - - env: DEF_LIB="shared" RUN_TESTS=1 + - env: DEF_LIB="shared" RUN_TESTS=1 TIMEOUT_FACTOR=9 arch: arm64 compiler: clang
Signature · 1 line
2.17.1
PATCH v2 1/1 test/cycles: restore original delay function
In reply to Ruifeng Wangtest_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.
---
v2:
Dropped other patches in the series that are not needed.
app/test/test_cycles.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
app/test/test_cycles.c +7 -1
@@ -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);
Signature · 1 line
2.17.1
PATCH v2 1/1 test/cycles: restore original delay function
In reply to Ruifeng Wangtest_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.
---
v2:
Dropped other patches in the series that are not needed.
app/test/test_cycles.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
app/test/test_cycles.c +7 -1
@@ -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);
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH v2] test/cycles: restore original delay function
Quoted 24 lines · Ruifeng Wang
test_delay_us_sleepregisters 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")Signed-off-by Ruifeng Wang <[email protected]>Reviewed-by Gavin Hu <[email protected]>---
v2:
Dropped other patches in the series that are not needed.app/test/test_cycles.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)app/test/test_cycles.c +0
-0
app/test/test_cycles.c REGISTER_TEST_COMMAND(cycles_autotest, test_cycles); · line 82
Quoted 4 lines
app/test/test_cycles.c +1
-0@@ -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.
app/test/test_cycles.c REGISTER_TEST_COMMAND(cycles_autotest, test_cycles); · line 92
Quoted 11 lines
app/test/test_cycles.c +6
-1+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);
Applied, thanks.
Signature · 1 line
David Marchand