Skip to content

Commit

Permalink
testsuite: reformat and clang-format off args[]
Browse files Browse the repository at this point in the history
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 <[email protected]>
Link: #118
Signed-off-by: Lucas De Marchi <[email protected]>
  • Loading branch information
evelikov authored and lucasdemarchi committed Sep 9, 2024
1 parent 2e38dc6 commit aab416b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
2 changes: 2 additions & 0 deletions testsuite/test-depmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 4 additions & 1 deletion testsuite/test-modinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
12 changes: 8 additions & 4 deletions testsuite/test-modprobe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit aab416b

Please sign in to comment.