]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
testsuite: reformat and clang-format off arrays
authorEmil Velikov <emil.l.velikov@gmail.com>
Sun, 8 Sep 2024 10:38:12 +0000 (11:38 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Mon, 9 Sep 2024 04:39:19 +0000 (23:39 -0500)
For some arrays, clang-format does far than ideal jobs reformatting. Do
so manually and ban clang-format from interfering.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/118
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
testsuite/test-new-module.c
testsuite/test-util.c

index 7ce85037fb696d67909db06fc4bcdd920e6eba71..866526de68ba9b1a1595b3038d98928c972af9c9 100644 (file)
 static int from_name(const struct test *t)
 {
        static const char *const modnames[] = {
+               // clang-format off
                "ext4",
                "balbalbalbbalbalbalbalbalbalbal",
                "snd-hda-intel",
                "snd-timer",
                "iTCO_wdt",
                NULL,
+               // clang-format on
        };
        const char *const *p;
        struct kmod_ctx *ctx;
index 1bab104a89cfb665576b055833e14615ef1c70ee..fde8e52532820ab736683bea47d580fad87866db 100644 (file)
 static int alias_1(const struct test *t)
 {
        static const char *const input[] = {
+               // clang-format off
                "test1234",
                "test[abcfoobar]2211",
                "bar[aaa][bbbb]sss",
                "kmod[p.b]lib",
                "[az]1234[AZ]",
                NULL,
+               // clang-format on
        };
 
        char buf[PATH_MAX];