]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
testsuite: add trailing comma for multi-line arrays
authorEmil Velikov <emil.l.velikov@gmail.com>
Sat, 7 Sep 2024 00:15:04 +0000 (01:15 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Sat, 7 Sep 2024 15:13:51 +0000 (10:13 -0500)
... 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>
testsuite/test-depmod.c
testsuite/test-util.c
testsuite/test-weakdep.c
testsuite/testsuite.c

index 65302f837a176c2b253142eda06ff3d24577c3cf..89e763ba08d88a0e9a4ebb7c4be270ad1ab49ce5 100644 (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" },
-                       { }
+                       { },
                },
        });
 
index 35112458cfb3b898691bf80c36602840ea24e8e7..6122999ec3c33720081890ca5a49c32f08c847c2 100644 (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" },
-                       { }
+                       { },
                },
        });
 
index 3a69e184c4f95746936d9f5cc686bbdf1721834d..563a7b48fa2afda6f53a3386e006b6c6e511c5b5 100644 (file)
 
 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)
index b08473d480fa1eec3a6a6475eb5d8f62948fda56..51a3d9f10f843069e628708d4b8fb2db19bb2186 100644 (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