[v10,7/7] test: add stress test suite

Message ID 20241111141910.40604-8-konstantin.ananyev@huawei.com (mailing list archive)
State New
Delegated to: Thomas Monjalon
Headers
Series Stage-Ordered API and other extensions for ring library |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-marvell-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-amd64-testing warning Testing issues
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS

Commit Message

Konstantin Ananyev Nov. 11, 2024, 2:19 p.m. UTC
Add a new test suite which purpose is to run 'stress' tests:
main purpose is put a pressure to dpdk sync algorithms
to flag their misbehaving/slowdown/etc.
Right now it consists from just 2 test-cases:
meson test --suite stress-tests --list
DPDK:stress-tests / ring_stress_autotest
DPDK:stress-tests / soring_stress_autotest

These tests are quite time consuming (~15 mins each),
that's another reason to put them into a separate test-suite.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 app/test/suites/meson.build   | 10 ++++++++++
 app/test/test.h               |  1 +
 app/test/test_ring_stress.c   |  2 +-
 app/test/test_soring_stress.c |  2 +-
 4 files changed, 13 insertions(+), 2 deletions(-)
  

Patch

diff --git a/app/test/suites/meson.build b/app/test/suites/meson.build
index 191702cf76..e482373330 100644
--- a/app/test/suites/meson.build
+++ b/app/test/suites/meson.build
@@ -5,6 +5,7 @@ 
 # to complete, so timeout to 10 minutes
 timeout_seconds = 600
 timeout_seconds_fast = 10
+timeout_seconds_stress = 900
 
 test_no_huge_args = ['--no-huge', '-m', '2048']
 has_hugepage = run_command(has_hugepages_cmd, check: true).stdout().strip() != '0'
@@ -21,6 +22,7 @@  endif
 # - fast_tests
 # - perf_tests
 # - driver_tests
+# - stress_tests
 test_suites = run_command(get_test_suites_cmd, autotest_sources,
          check: true).stdout().strip().split()
 foreach suite:test_suites
@@ -39,6 +41,14 @@  foreach suite:test_suites
                     timeout: timeout_seconds,
                     is_parallel: false)
         endforeach
+    elif suite_name == 'stress-tests'
+        foreach t: suite_tests
+            test(t, dpdk_test,
+                    env: ['DPDK_TEST=' + t],
+                    timeout: timeout_seconds_stress,
+                    is_parallel: false,
+                    suite: suite_name)
+        endforeach
     elif suite_name != 'fast-tests'
         # simple cases - tests without parameters or special handling
         foreach t: suite_tests
diff --git a/app/test/test.h b/app/test/test.h
index 15e23d297f..ebc4864bf8 100644
--- a/app/test/test.h
+++ b/app/test/test.h
@@ -208,5 +208,6 @@  void add_test_command(struct test_command *t);
 #define REGISTER_FAST_TEST(cmd, no_huge, ASan, func)  REGISTER_TEST_COMMAND(cmd, func)
 #define REGISTER_PERF_TEST REGISTER_TEST_COMMAND
 #define REGISTER_DRIVER_TEST REGISTER_TEST_COMMAND
+#define REGISTER_STRESS_TEST REGISTER_TEST_COMMAND
 
 #endif
diff --git a/app/test/test_ring_stress.c b/app/test/test_ring_stress.c
index 1af45e0fc8..82e19b02c3 100644
--- a/app/test/test_ring_stress.c
+++ b/app/test/test_ring_stress.c
@@ -63,4 +63,4 @@  test_ring_stress(void)
 	return (k != n);
 }
 
-REGISTER_TEST_COMMAND(ring_stress_autotest, test_ring_stress);
+REGISTER_STRESS_TEST(ring_stress_autotest, test_ring_stress);
diff --git a/app/test/test_soring_stress.c b/app/test/test_soring_stress.c
index 334af6a29c..e5655d49cb 100644
--- a/app/test/test_soring_stress.c
+++ b/app/test/test_soring_stress.c
@@ -45,4 +45,4 @@  test_ring_stress(void)
 	return (k != n);
 }
 
-REGISTER_TEST_COMMAND(soring_stress_autotest, test_ring_stress);
+REGISTER_STRESS_TEST(soring_stress_autotest, test_ring_stress);