[13/14] test: do not start tests in parallel

Message ID 1559638792-8608-14-git-send-email-david.marchand@redhat.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series Unit tests fixes for CI |

Checks

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

Commit Message

David Marchand June 4, 2019, 8:59 a.m. UTC
  Running the tests in parallel has two drawbacks:
- the tests are racing on the hugepages allocations,
- the tests are sharing the cores to run their checks which results in
  undeterministic execution time,

This results in random failures.
For better reproducibility in CI, start them all in a serialised way.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test/meson.build | 25 +++++--------------------
 1 file changed, 5 insertions(+), 20 deletions(-)
  

Patch

diff --git a/app/test/meson.build b/app/test/meson.build
index 212cd1b..f0797c9 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -144,8 +144,7 @@  test_deps = ['acl',
 	'timer'
 ]
 
-# All test cases in fast_parallel_test_names list are parallel
-fast_parallel_test_names = [
+fast_test_names = [
         'acl_autotest',
         'alarm_autotest',
         'atomic_autotest',
@@ -192,10 +191,6 @@  fast_parallel_test_names = [
         'timer_autotest',
         'user_delay_us',
         'version_autotest',
-]
-
-# All test cases in fast_non_parallel_test_names list are non-parallel
-fast_non_parallel_test_names = [
         'bitratestats_autotest',
         'crc_autotest',
         'delay_us_sleep_autotest',
@@ -219,7 +214,6 @@  fast_non_parallel_test_names = [
         'thash_autotest',
 ]
 
-# All test cases in perf_test_names list are non-parallel
 perf_test_names = [
         'ring_perf_autotest',
         'mempool_perf_autotest',
@@ -247,7 +241,6 @@  perf_test_names = [
         'stack_lf_perf_autotest',
 ]
 
-# All test cases in driver_test_names list are non-parallel
 driver_test_names = [
         'cryptodev_aesni_mb_autotest',
         'cryptodev_aesni_gcm_autotest',
@@ -269,7 +262,6 @@  driver_test_names = [
         'link_bonding_rssconf_autotest',
 ]
 
-# All test cases in dump_test_names list are non-parallel
 dump_test_names = [
         'dump_struct_sizes',
         'dump_mempool',
@@ -318,7 +310,7 @@  if dpdk_conf.has('RTE_LIBRTE_COMPRESSDEV')
 		test_dep_objs += compress_test_dep
 		test_sources += 'test_compressdev.c'
 		test_deps += 'compressdev'
-		fast_non_parallel_test_names += 'compressdev_autotest'
+		fast_test_names += 'compressdev_autotest'
 	endif
 endif
 
@@ -367,30 +359,23 @@  if get_option('tests')
 	num_cores_arg = '-l ' + num_cores
 
 	test_args = [num_cores_arg]
-	foreach arg : fast_parallel_test_names
+	foreach arg : fast_test_names
 		if host_machine.system() == 'linux'
 			test(arg, dpdk_test,
 				  env : ['DPDK_TEST=' + arg],
 				  args : test_args +
 					 ['--file-prefix=@0@'.format(arg)],
 			timeout : timeout_seconds_fast,
+			is_parallel : false,
 			suite : 'fast-tests')
 		else
 			test(arg, dpdk_test,
 				env : ['DPDK_TEST=' + arg],
 				args : test_args,
 			timeout : timeout_seconds_fast,
-			suite : 'fast-tests')
-		endif
-	endforeach
-
-	foreach arg : fast_non_parallel_test_names
-		test(arg, dpdk_test,
-			env : ['DPDK_TEST=' + arg],
-			args : test_args,
-			timeout : timeout_seconds_fast,
 			is_parallel : false,
 			suite : 'fast-tests')
+		endif
 	endforeach
 
 	foreach arg : perf_test_names