]> git.droids-corp.org - dpdk.git/commitdiff
test: split into shorter subtests
authorDavid Marchand <david.marchand@redhat.com>
Sat, 15 Jun 2019 06:42:28 +0000 (08:42 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 27 Jun 2019 20:34:09 +0000 (22:34 +0200)
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 <david.marchand@redhat.com>
app/test/meson.build
app/test/test_eal_flags.c
app/test/test_rwlock.c

index a9dddf87e7e86aaa3b62ee1cec16285c636c951b..f799c8eca242856c27873f7f0e5ff82b25d7ad28 100644 (file)
@@ -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',
index cfa8a61f34e83a3a10baf1eaa70324e02ac22121..9985ee97980876ceaff01478a08d7965734499e9 100644 (file)
@@ -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);
index c3d656a8d0ce26541b66fd0b1d7a1d0fe6659455..40f91759c2696f7dae92dd28023e687f8b4b8ace 100644 (file)
@@ -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);