From: David Marchand Date: Sat, 15 Jun 2019 06:42:28 +0000 (+0200) Subject: test: split into shorter subtests X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=57739f65d09ac072466d0e51b9372992781e78d6;p=dpdk.git test: split into shorter subtests Based on Michael initial idea of separating the file-prefix subtest in the eal flags test. Let's split the biggest tests into their subparts. It is then easier to have them fit in the 10s timeout we have configured in Travis. We also get a better idea of which part fails in the previously big tests we had. Those new subtests are called from the meson testsuite. The autotest tool is left untouched. Note: we still have an issue with test_hash_readwrite_lf.c, any help from the original authors would be appreciated. Signed-off-by: David Marchand --- diff --git a/app/test/meson.build b/app/test/meson.build index a9dddf87e7..f799c8eca2 100644 --- a/app/test/meson.build +++ b/app/test/meson.build @@ -159,7 +159,18 @@ fast_parallel_test_names = [ 'cpuflags_autotest', 'cycles_autotest', 'debug_autotest', - 'eal_flags_autotest', + 'eal_flags_c_opt_autotest', + 'eal_flags_master_opt_autotest', + 'eal_flags_n_opt_autotest', + 'eal_flags_hpet_autotest', + 'eal_flags_no_huge_autotest', + 'eal_flags_w_opt_autotest', + 'eal_flags_b_opt_autotest', + 'eal_flags_vdev_opt_autotest', + 'eal_flags_r_opt_autotest', + 'eal_flags_mem_autotest', + 'eal_flags_file_prefix_autotest', + 'eal_flags_misc_autotest', 'eal_fs_autotest', 'errno_autotest', 'event_ring_autotest', @@ -184,7 +195,10 @@ fast_parallel_test_names = [ 'red_autotest', 'ring_autotest', 'ring_pmd_autotest', - 'rwlock_autotest', + 'rwlock_test1_autotest', + 'rwlock_rda_autotest', + 'rwlock_rds_wrm_autotest', + 'rwlock_rde_wro_autotest', 'sched_autotest', 'spinlock_autotest', 'stack_autotest', diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c index cfa8a61f34..9985ee9798 100644 --- a/app/test/test_eal_flags.c +++ b/app/test/test_eal_flags.c @@ -342,10 +342,10 @@ test_invalid_b_flag(void) * Test that the app doesn't run with invalid vdev option. * Final test ensures it does run with valid options as sanity check */ -#ifdef RTE_LIBRTE_PMD_RING static int test_invalid_vdev_flag(void) { +#ifdef RTE_LIBRTE_PMD_RING #ifdef RTE_EXEC_ENV_FREEBSD /* BSD target doesn't support prefixes at this point, and we also need to * run another primary process here */ @@ -391,8 +391,10 @@ test_invalid_vdev_flag(void) return -1; } return 0; -} +#else + return TEST_SKIPPED; #endif +} /* * Test that the app doesn't run with invalid -r option. @@ -1413,3 +1415,17 @@ test_eal_flags(void) } REGISTER_TEST_COMMAND(eal_flags_autotest, test_eal_flags); + +/* subtests used in meson for CI */ +REGISTER_TEST_COMMAND(eal_flags_c_opt_autotest, test_missing_c_flag); +REGISTER_TEST_COMMAND(eal_flags_master_opt_autotest, test_master_lcore_flag); +REGISTER_TEST_COMMAND(eal_flags_n_opt_autotest, test_invalid_n_flag); +REGISTER_TEST_COMMAND(eal_flags_hpet_autotest, test_no_hpet_flag); +REGISTER_TEST_COMMAND(eal_flags_no_huge_autotest, test_no_huge_flag); +REGISTER_TEST_COMMAND(eal_flags_w_opt_autotest, test_whitelist_flag); +REGISTER_TEST_COMMAND(eal_flags_b_opt_autotest, test_invalid_b_flag); +REGISTER_TEST_COMMAND(eal_flags_vdev_opt_autotest, test_invalid_vdev_flag); +REGISTER_TEST_COMMAND(eal_flags_r_opt_autotest, test_invalid_r_flag); +REGISTER_TEST_COMMAND(eal_flags_mem_autotest, test_memory_flags); +REGISTER_TEST_COMMAND(eal_flags_file_prefix_autotest, test_file_prefix); +REGISTER_TEST_COMMAND(eal_flags_misc_autotest, test_misc_flags); diff --git a/app/test/test_rwlock.c b/app/test/test_rwlock.c index c3d656a8d0..40f91759c2 100644 --- a/app/test/test_rwlock.c +++ b/app/test/test_rwlock.c @@ -547,3 +547,9 @@ test_rwlock(void) } REGISTER_TEST_COMMAND(rwlock_autotest, test_rwlock); + +/* subtests used in meson for CI */ +REGISTER_TEST_COMMAND(rwlock_test1_autotest, rwlock_test1); +REGISTER_TEST_COMMAND(rwlock_rda_autotest, try_rwlock_test_rda); +REGISTER_TEST_COMMAND(rwlock_rds_wrm_autotest, try_rwlock_test_rds_wrm); +REGISTER_TEST_COMMAND(rwlock_rde_wro_autotest, try_rwlock_test_rde_wro);