[2/4] test/cycles: increase threshold for containers on aarch64
diff mbox series

Message ID 20200424074356.193204-3-ruifeng.wang@arm.com
State Rejected
Delegated to: David Marchand
Headers show
Series
  • arm64 CI stabilize
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Ruifeng Wang April 24, 2020, 7:43 a.m. UTC
rte_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.

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
---
 app/test/test_cycles.c | 7 +++++++
 1 file changed, 7 insertions(+)

Patch
diff mbox series

diff --git a/app/test/test_cycles.c b/app/test/test_cycles.c
index 015a9290f..52bc9af81 100644
--- a/app/test/test_cycles.c
+++ b/app/test/test_cycles.c
@@ -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);