DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/4] arm64 CI stabilize
@ 2020-04-24  7:43 Ruifeng Wang
  2020-04-24  7:43 ` [dpdk-dev] [PATCH 1/4] test/cycles: restore original delay function Ruifeng Wang
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Ruifeng Wang @ 2020-04-24  7:43 UTC (permalink / raw)
  To: aconole, maicolgabriel
  Cc: dev, gavin.hu, honnappa.nagarahalli, juraj.linkes, nd, Ruifeng Wang

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

-- 
2.17.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [dpdk-dev] [PATCH 1/4] test/cycles: restore original delay function
  2020-04-24  7:43 [dpdk-dev] [PATCH 0/4] arm64 CI stabilize Ruifeng Wang
@ 2020-04-24  7:43 ` Ruifeng Wang
  2020-04-24  7:43 ` [dpdk-dev] [PATCH 2/4] test/cycles: increase threshold for containers on aarch64 Ruifeng Wang
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Ruifeng Wang @ 2020-04-24  7:43 UTC (permalink / raw)
  To: aconole, maicolgabriel
  Cc: dev, gavin.hu, honnappa.nagarahalli, juraj.linkes, nd,
	Ruifeng Wang, stable

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

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [dpdk-dev] [PATCH 2/4] test/cycles: increase threshold for containers on aarch64
  2020-04-24  7:43 [dpdk-dev] [PATCH 0/4] arm64 CI stabilize Ruifeng Wang
  2020-04-24  7:43 ` [dpdk-dev] [PATCH 1/4] test/cycles: restore original delay function Ruifeng Wang
@ 2020-04-24  7:43 ` Ruifeng Wang
  2020-04-24  7:43 ` [dpdk-dev] [PATCH 3/4] ci: expose test time out argument Ruifeng Wang
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Ruifeng Wang @ 2020-04-24  7:43 UTC (permalink / raw)
  To: aconole, maicolgabriel
  Cc: dev, gavin.hu, honnappa.nagarahalli, juraj.linkes, nd, Ruifeng Wang

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(+)

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [dpdk-dev] [PATCH 3/4] ci: expose test time out argument
  2020-04-24  7:43 [dpdk-dev] [PATCH 0/4] arm64 CI stabilize Ruifeng Wang
  2020-04-24  7:43 ` [dpdk-dev] [PATCH 1/4] test/cycles: restore original delay function Ruifeng Wang
  2020-04-24  7:43 ` [dpdk-dev] [PATCH 2/4] test/cycles: increase threshold for containers on aarch64 Ruifeng Wang
@ 2020-04-24  7:43 ` Ruifeng Wang
  2020-04-24  7:43 ` [dpdk-dev] [PATCH 4/4] ci: increase time out multiplier for containers on aarch64 Ruifeng Wang
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Ruifeng Wang @ 2020-04-24  7:43 UTC (permalink / raw)
  To: aconole, maicolgabriel
  Cc: dev, gavin.hu, honnappa.nagarahalli, juraj.linkes, nd, Ruifeng Wang

The 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.

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
---
 .ci/linux-build.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index d079801d7..b653de97c 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -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
-- 
2.17.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [dpdk-dev] [PATCH 4/4] ci: increase time out multiplier for containers on aarch64
  2020-04-24  7:43 [dpdk-dev] [PATCH 0/4] arm64 CI stabilize Ruifeng Wang
                   ` (2 preceding siblings ...)
  2020-04-24  7:43 ` [dpdk-dev] [PATCH 3/4] ci: expose test time out argument Ruifeng Wang
@ 2020-04-24  7:43 ` Ruifeng Wang
  2020-07-27 10:16 ` [dpdk-dev] [PATCH v2] test/cycles: restore original delay function Ruifeng Wang
  2020-07-27 10:21 ` Ruifeng Wang
  5 siblings, 0 replies; 8+ messages in thread
From: Ruifeng Wang @ 2020-04-24  7:43 UTC (permalink / raw)
  To: aconole, maicolgabriel
  Cc: dev, gavin.hu, honnappa.nagarahalli, juraj.linkes, nd, Ruifeng Wang

aarch64 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.

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
---
 .travis.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 2d2292ff6..e8a4b99b0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -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
-- 
2.17.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [dpdk-dev] [PATCH v2] test/cycles: restore original delay function
  2020-04-24  7:43 [dpdk-dev] [PATCH 0/4] arm64 CI stabilize Ruifeng Wang
                   ` (3 preceding siblings ...)
  2020-04-24  7:43 ` [dpdk-dev] [PATCH 4/4] ci: increase time out multiplier for containers on aarch64 Ruifeng Wang
@ 2020-07-27 10:16 ` Ruifeng Wang
  2020-07-27 10:21 ` Ruifeng Wang
  5 siblings, 0 replies; 8+ messages in thread
From: Ruifeng Wang @ 2020-07-27 10:16 UTC (permalink / raw)
  Cc: dev, i.maximets, honnappa.nagarahalli, nd, Ruifeng Wang, 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 <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
---
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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [dpdk-dev] [PATCH v2] test/cycles: restore original delay function
  2020-04-24  7:43 [dpdk-dev] [PATCH 0/4] arm64 CI stabilize Ruifeng Wang
                   ` (4 preceding siblings ...)
  2020-07-27 10:16 ` [dpdk-dev] [PATCH v2] test/cycles: restore original delay function Ruifeng Wang
@ 2020-07-27 10:21 ` Ruifeng Wang
  2020-07-27 12:21   ` David Marchand
  5 siblings, 1 reply; 8+ messages in thread
From: Ruifeng Wang @ 2020-07-27 10:21 UTC (permalink / raw)
  Cc: dev, honnappa.nagarahalli, nd, Ruifeng Wang, 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 default 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 <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
---
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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [PATCH v2] test/cycles: restore original delay function
  2020-07-27 10:21 ` Ruifeng Wang
@ 2020-07-27 12:21   ` David Marchand
  0 siblings, 0 replies; 8+ messages in thread
From: David Marchand @ 2020-07-27 12:21 UTC (permalink / raw)
  To: Ruifeng Wang; +Cc: dev, Honnappa Nagarahalli, nd, dpdk stable, Ilya Maximets

On Mon, Jul 27, 2020 at 12:22 PM Ruifeng Wang <ruifeng.wang@arm.com> wrote:
>
> test_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.
>
> 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>
> ---
> 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;

No initialisation needed, I removed it while applying.


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

Reviewed-by: David Marchand <david.marchand@redhat.com>


Applied, thanks.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-07-27 12:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-24  7:43 [dpdk-dev] [PATCH 0/4] arm64 CI stabilize Ruifeng Wang
2020-04-24  7:43 ` [dpdk-dev] [PATCH 1/4] test/cycles: restore original delay function Ruifeng Wang
2020-04-24  7:43 ` [dpdk-dev] [PATCH 2/4] test/cycles: increase threshold for containers on aarch64 Ruifeng Wang
2020-04-24  7:43 ` [dpdk-dev] [PATCH 3/4] ci: expose test time out argument Ruifeng Wang
2020-04-24  7:43 ` [dpdk-dev] [PATCH 4/4] ci: increase time out multiplier for containers on aarch64 Ruifeng Wang
2020-07-27 10:16 ` [dpdk-dev] [PATCH v2] test/cycles: restore original delay function Ruifeng Wang
2020-07-27 10:21 ` Ruifeng Wang
2020-07-27 12:21   ` David Marchand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).