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 <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/114
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
This commit is contained in:
Emil Velikov 2024-09-07 01:15:04 +01:00 committed by Lucas De Marchi
parent 13531c2927
commit 1825f5565f
4 changed files with 14 additions and 14 deletions

View File

@ -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" },
{ }
{ },
},
});

View File

@ -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" },
{ }
{ },
},
});

View File

@ -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)

View File

@ -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