Skip to content

Commit

Permalink
testsuite: Remove trailing ;
Browse files Browse the repository at this point in the history
Remove trailing ; from DEFINE_TEST_WITH_FUNC() and ensure the callers
add it on their own, like it's done with other defines.

Signed-off-by: Lucas De Marchi <[email protected]>
  • Loading branch information
lucasdemarchi committed Jan 3, 2025
1 parent 31c859c commit 5bdb54c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions testsuite/test-hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ static int test_hash_add_unique(const struct test *t)
return 0;
}
DEFINE_TEST(test_hash_add_unique,
.description = "test hash_add_unique with different key orders")
.description = "test hash_add_unique with different key orders");

static int test_hash_massive_add_del(const struct test *t)
{
Expand Down Expand Up @@ -282,6 +282,6 @@ static int test_hash_massive_add_del(const struct test *t)
return 0;
}
DEFINE_TEST(test_hash_massive_add_del,
.description = "test multiple adds followed by multiple dels")
.description = "test multiple adds followed by multiple dels");

TESTSUITE_MAIN();
4 changes: 2 additions & 2 deletions testsuite/test-modinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ DEFINE_TEST(test_modinfo_external,
},
.output = {
.out = TESTSUITE_ROOTFS "test-modinfo/correct-external.txt",
})
});

static noreturn int test_modinfo_builtin(const struct test *t)
{
Expand All @@ -122,6 +122,6 @@ DEFINE_TEST(test_modinfo_builtin,
},
.output = {
.out = TESTSUITE_ROOTFS "test-modinfo/correct-builtin.txt",
})
});

TESTSUITE_MAIN();
16 changes: 8 additions & 8 deletions testsuite/test-util.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static int test_strchr_replace(const struct test *t)

return EXIT_SUCCESS;
}
DEFINE_TEST(test_strchr_replace, .description = "check implementation of strchr_replace()")
DEFINE_TEST(test_strchr_replace, .description = "check implementation of strchr_replace()");

static int test_underscores(const struct test *t)
{
Expand All @@ -124,7 +124,7 @@ static int test_underscores(const struct test *t)

return EXIT_SUCCESS;
}
DEFINE_TEST(test_underscores, .description = "check implementation of underscores()")
DEFINE_TEST(test_underscores, .description = "check implementation of underscores()");

static int test_path_ends_with_kmod_ext(const struct test *t)
{
Expand Down Expand Up @@ -158,7 +158,7 @@ static int test_path_ends_with_kmod_ext(const struct test *t)
return EXIT_SUCCESS;
}
DEFINE_TEST(test_path_ends_with_kmod_ext,
.description = "check implementation of path_ends_with_kmod_ext()")
.description = "check implementation of path_ends_with_kmod_ext()");

#define TEST_WRITE_STR_SAFE_FILE "/write-str-safe"
#define TEST_WRITE_STR_SAFE_PATH TESTSUITE_ROOTFS "test-util2/" TEST_WRITE_STR_SAFE_FILE
Expand Down Expand Up @@ -203,7 +203,7 @@ static int test_uadd32_overflow(const struct test *t)
return EXIT_SUCCESS;
}
DEFINE_TEST(test_uadd32_overflow,
.description = "check implementation of uadd32_overflow()")
.description = "check implementation of uadd32_overflow()");

static int test_uadd64_overflow(const struct test *t)
{
Expand All @@ -220,7 +220,7 @@ static int test_uadd64_overflow(const struct test *t)
return EXIT_SUCCESS;
}
DEFINE_TEST(test_uadd64_overflow,
.description = "check implementation of uadd64_overflow()")
.description = "check implementation of uadd64_overflow()");

static int test_umul32_overflow(const struct test *t)
{
Expand All @@ -237,7 +237,7 @@ static int test_umul32_overflow(const struct test *t)
return EXIT_SUCCESS;
}
DEFINE_TEST(test_umul32_overflow,
.description = "check implementation of umul32_overflow()")
.description = "check implementation of umul32_overflow()");

static int test_umul64_overflow(const struct test *t)
{
Expand All @@ -254,7 +254,7 @@ static int test_umul64_overflow(const struct test *t)
return EXIT_SUCCESS;
}
DEFINE_TEST(test_umul64_overflow,
.description = "check implementation of umul64_overflow()")
.description = "check implementation of umul64_overflow()");

static int test_backoff_time(const struct test *t)
{
Expand Down Expand Up @@ -292,6 +292,6 @@ static int test_backoff_time(const struct test *t)
return EXIT_SUCCESS;
}
DEFINE_TEST(test_backoff_time,
.description = "check implementation of get_backoff_delta_msec()")
.description = "check implementation of get_backoff_delta_msec()");

TESTSUITE_MAIN();
2 changes: 1 addition & 1 deletion testsuite/testsuite.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ int test_run(const struct test *t);
static const struct test UNIQ(s##_name) \
__attribute__((retain, used, section("kmod_tests"), aligned(8))) = { \
.name = #_name, .func = _func, ##__VA_ARGS__ \
}; \
} \

#define DEFINE_TEST(_name, ...) DEFINE_TEST_WITH_FUNC(_name, _name, __VA_ARGS__)

Expand Down

0 comments on commit 5bdb54c

Please sign in to comment.