From: Emil Velikov Date: Sat, 7 Sep 2024 00:15:04 +0000 (+0100) Subject: testsuite: add trailing comma for multi-line arrays X-Git-Tag: v34~408 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1825f5565f56690f0b5205b072d73d2099c8427e;p=thirdparty%2Fkmod.git testsuite: add trailing comma for multi-line arrays ... otherwise the upcoming clang-format will try to fold them on single line, making the end result far from ideal. Signed-off-by: Emil Velikov Link: https://github.com/kmod-project/kmod/pull/114 Signed-off-by: Lucas De Marchi --- diff --git a/testsuite/test-depmod.c b/testsuite/test-depmod.c index 65302f83..89e763ba 100644 --- a/testsuite/test-depmod.c +++ b/testsuite/test-depmod.c @@ -38,7 +38,7 @@ DEFINE_TEST(depmod_modules_order_for_compressed, .files = (const struct keyval[]) { { MODULES_ORDER_LIB_MODULES "/correct-modules.alias", MODULES_ORDER_LIB_MODULES "/modules.alias" }, - { } + { }, }, }); @@ -70,7 +70,7 @@ DEFINE_TEST(depmod_modules_outdir, MODULES_OUTDIR_ROOTFS "/correct-modules.dep" }, { MODULES_OUTDIR_LIB_MODULES_OUTPUT "/modules.alias", MODULES_OUTDIR_ROOTFS "/correct-modules.alias" }, - { } + { }, }, }); @@ -97,7 +97,7 @@ DEFINE_TEST(depmod_search_order_simple, .files = (const struct keyval[]) { { SEARCH_ORDER_SIMPLE_LIB_MODULES "/correct-modules.dep", SEARCH_ORDER_SIMPLE_LIB_MODULES "/modules.dep" }, - { } + { }, }, }); @@ -124,7 +124,7 @@ DEFINE_TEST(depmod_search_order_same_prefix, .files = (const struct keyval[]) { { SEARCH_ORDER_SAME_PREFIX_LIB_MODULES "/correct-modules.dep", SEARCH_ORDER_SAME_PREFIX_LIB_MODULES "/modules.dep" }, - { } + { }, }, }); @@ -174,7 +174,7 @@ DEFINE_TEST(depmod_search_order_external_first, .files = (const struct keyval[]) { { SEARCH_ORDER_EXTERNAL_FIRST_LIB_MODULES "/correct-modules.dep", SEARCH_ORDER_EXTERNAL_FIRST_LIB_MODULES "/modules.dep" }, - { } + { }, }, }); @@ -201,7 +201,7 @@ DEFINE_TEST(depmod_search_order_external_last, .files = (const struct keyval[]) { { SEARCH_ORDER_EXTERNAL_LAST_LIB_MODULES "/correct-modules.dep", SEARCH_ORDER_EXTERNAL_LAST_LIB_MODULES "/modules.dep" }, - { } + { }, }, }); @@ -228,7 +228,7 @@ DEFINE_TEST(depmod_search_order_override, .files = (const struct keyval[]) { { SEARCH_ORDER_OVERRIDE_LIB_MODULES "/correct-modules.dep", SEARCH_ORDER_OVERRIDE_LIB_MODULES "/modules.dep" }, - { } + { }, }, }); @@ -255,7 +255,7 @@ DEFINE_TEST(depmod_check_weakdep, .files = (const struct keyval[]) { { CHECK_WEAKDEP_LIB_MODULES "/correct-modules.weakdep", CHECK_WEAKDEP_LIB_MODULES "/modules.weakdep" }, - { } + { }, }, }); diff --git a/testsuite/test-util.c b/testsuite/test-util.c index 35112458..6122999e 100644 --- a/testsuite/test-util.c +++ b/testsuite/test-util.c @@ -116,7 +116,7 @@ static int test_underscores(const struct test *t) { strdup("-aa-[bb]-cc-"), "_aa_[bb]_cc_" }, { strdup("-aa-[b-b]-cc-"), "_aa_[b-b]_cc_" }, { strdup("-aa-b[-]b-cc"), "_aa_b[-]b_cc" }, - { } + { }, }, *iter; for (iter = &teststr[0]; iter->val != NULL; iter++) { @@ -152,7 +152,7 @@ static int test_path_ends_with_kmod_ext(const struct test *t) { "/bla.ko.", false }, { "/bla.koz", false }, { "/b", false }, - { } + { }, }, *iter; for (iter = &teststr[0]; iter->val != NULL; iter++) { @@ -193,7 +193,7 @@ DEFINE_TEST(test_write_str_safe, .files = (const struct keyval[]) { { TEST_WRITE_STR_SAFE_PATH ".txt", TEST_WRITE_STR_SAFE_PATH "-correct.txt" }, - { } + { }, }, }); diff --git a/testsuite/test-weakdep.c b/testsuite/test-weakdep.c index 3a69e184..563a7b48 100644 --- a/testsuite/test-weakdep.c +++ b/testsuite/test-weakdep.c @@ -20,13 +20,13 @@ static const char *const test_weakdep_config_paths[] = { TEST_WEAKDEP_ROOTFS "etc/modprobe.d", - NULL + NULL, }; static const char *const mod_name[] = { "mod-loop-b", "mod-weakdep", - NULL + NULL, }; static int test_weakdep(const struct test *t) diff --git a/testsuite/testsuite.c b/testsuite/testsuite.c index b08473d4..51a3d9f1 100644 --- a/testsuite/testsuite.c +++ b/testsuite/testsuite.c @@ -36,7 +36,7 @@ static const char options_short[] = "lhn"; static const struct option options[] = { { "list", no_argument, 0, 'l' }, { "help", no_argument, 0, 'h' }, - { NULL, 0, 0, 0 } + { NULL, 0, 0, 0 }, }; #define TEST_TIMEOUT_USEC 2 * USEC_PER_SEC