From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Tyler Retzlaff <roretzla@linux.microsoft.com>
Subject: [PATCH 4/4] test: use unit test runner for eal flags
Date: Sat, 15 Nov 2025 11:33:10 -0800 [thread overview]
Message-ID: <20251115193409.99740-5-stephen@networkplumber.org> (raw)
In-Reply-To: <20251115193409.99740-1-stephen@networkplumber.org>
Make the sub tests in eal flags suite into a group
so that they are not individual tests.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/test/test_eal_flags.c | 38 ++++++++++++++++++++++++++------------
1 file changed, 26 insertions(+), 12 deletions(-)
diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c
index 0eead2a422..12ba54339d 100644
--- a/app/test/test_eal_flags.c
+++ b/app/test/test_eal_flags.c
@@ -1649,15 +1649,29 @@ test_memory_flags(void)
#endif /* !RTE_EXEC_ENV_WINDOWS */
-REGISTER_FAST_TEST(eal_flags_c_opt_autotest, false, false, test_missing_c_flag);
-REGISTER_FAST_TEST(eal_flags_main_opt_autotest, false, false, test_main_lcore_flag);
-REGISTER_FAST_TEST(eal_flags_n_opt_autotest, false, false, test_invalid_n_flag);
-REGISTER_FAST_TEST(eal_flags_hpet_autotest, false, false, test_no_hpet_flag);
-REGISTER_FAST_TEST(eal_flags_no_huge_autotest, false, false, test_no_huge_flag);
-REGISTER_FAST_TEST(eal_flags_a_opt_autotest, false, false, test_allow_flag);
-REGISTER_FAST_TEST(eal_flags_b_opt_autotest, false, false, test_invalid_b_flag);
-REGISTER_FAST_TEST(eal_flags_vdev_opt_autotest, false, false, test_invalid_vdev_flag);
-REGISTER_FAST_TEST(eal_flags_r_opt_autotest, false, false, test_invalid_r_flag);
-REGISTER_FAST_TEST(eal_flags_mem_autotest, false, false, test_memory_flags);
-REGISTER_FAST_TEST(eal_flags_file_prefix_autotest, false, false, test_file_prefix);
-REGISTER_FAST_TEST(eal_flags_misc_autotest, false, false, test_misc_flags);
+static struct unit_test_suite eal_flags_test_suite = {
+ .suite_name = "EAL flags unit test suite",
+ .unit_test_cases = {
+ TEST_CASE(test_missing_c_flag),
+ TEST_CASE(test_main_lcore_flag),
+ TEST_CASE(test_invalid_n_flag),
+ TEST_CASE(test_no_hpet_flag),
+ TEST_CASE(test_no_huge_flag),
+ TEST_CASE(test_allow_flag),
+ TEST_CASE(test_invalid_b_flag),
+ TEST_CASE(test_invalid_vdev_flag),
+ TEST_CASE(test_invalid_r_flag),
+ TEST_CASE(test_memory_flags),
+ TEST_CASE(test_file_prefix),
+ TEST_CASE(test_misc_flags),
+ TEST_CASES_END()
+ }
+};
+
+static int
+test_eal_flags(void)
+{
+ return unit_test_suite_runner(&eal_flags_test_suite);
+}
+
+REGISTER_FAST_TEST(eal_flags_autotest, false, false, test_eal_flags);
--
2.51.0
prev parent reply other threads:[~2025-11-15 19:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-15 19:33 [PATCH 0/4] test: eal flags cleanup Stephen Hemminger
2025-11-15 19:33 ` [PATCH 1/4] test: re-enable format-truncation warnings Stephen Hemminger
2025-11-15 19:43 ` Stephen Hemminger
2025-11-15 19:33 ` [PATCH 2/4] test: increase size of memzone name Stephen Hemminger
2025-11-15 19:33 ` [PATCH 3/4] test: refactor file prefix arg handling Stephen Hemminger
2025-11-15 19:33 ` Stephen Hemminger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251115193409.99740-5-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=roretzla@linux.microsoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).