From aab416b4a8904ef0455bcd36d5c376c7ce972f94 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Sun, 8 Sep 2024 11:38:12 +0100 Subject: [PATCH] testsuite: reformat and clang-format off args[] Reformat a bunch of the args blocks and freeze them as-is. The remaining instances clang-format handles correctly. The format is: progname, '--list', 'of', '--arguments', 'modname', NULL Signed-off-by: Emil Velikov Link: https://github.com/kmod-project/kmod/pull/118 Signed-off-by: Lucas De Marchi --- testsuite/test-depmod.c | 2 ++ testsuite/test-modinfo.c | 5 ++++- testsuite/test-modprobe.c | 12 ++++++++---- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/testsuite/test-depmod.c b/testsuite/test-depmod.c index 89e763ba..478dda04 100644 --- a/testsuite/test-depmod.c +++ b/testsuite/test-depmod.c @@ -49,9 +49,11 @@ static noreturn int depmod_modules_outdir(const struct test *t) { const char *progname = TOOLS_DIR "/depmod"; const char *const args[] = { + // clang-format off progname, "--outdir", MODULES_OUTDIR_ROOTFS "/outdir/", NULL, + // clang-format on }; test_spawn_prog(progname, args); diff --git a/testsuite/test-modinfo.c b/testsuite/test-modinfo.c index 8b7c050e..c886b541 100644 --- a/testsuite/test-modinfo.c +++ b/testsuite/test-modinfo.c @@ -89,9 +89,12 @@ DEFINE_TEST(test_modinfo_signature, static noreturn int test_modinfo_external(const struct test *t) { const char *const args[] = { - progname, "-F", "filename", + // clang-format off + progname, + "-F", "filename", "mod-simple", NULL, + // clang-format on }; test_spawn_prog(progname, args); exit(EXIT_FAILURE); diff --git a/testsuite/test-modprobe.c b/testsuite/test-modprobe.c index 39c19014..414c8cd8 100644 --- a/testsuite/test-modprobe.c +++ b/testsuite/test-modprobe.c @@ -57,14 +57,16 @@ DEFINE_TEST(modprobe_show_depends2, .out = TESTSUITE_ROOTFS "test-modprobe/show-depends/correct-mod-simple.txt", }); - static noreturn int modprobe_show_alias_to_none(const struct test *t) { const char *progname = TOOLS_DIR "/modprobe"; const char *const args[] = { + // clang-format off progname, - "--show-depends", "--ignore-install", "--quiet", "mod-simple", + "--show-depends", "--ignore-install", "--quiet", + "mod-simple", NULL, + // clang-format on }; test_spawn_prog(progname, args); @@ -82,14 +84,16 @@ DEFINE_TEST(modprobe_show_alias_to_none, .modules_loaded = "", ); - static noreturn int modprobe_show_exports(const struct test *t) { const char *progname = TOOLS_DIR "/modprobe"; const char *const args[] = { + // clang-format off progname, - "--show-exports", "--quiet", "/mod-loop-a.ko", + "--show-exports", "--quiet", + "/mod-loop-a.ko", NULL, + // clang-format on }; test_spawn_prog(progname, args);