From: Lucas De Marchi Date: Fri, 3 Jan 2025 19:21:49 +0000 (-0600) Subject: testsuite: Remove trailing ; X-Git-Tag: v34~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc98aea5c5c3e0318fc4b540ccb780b0dbf12fcb;p=thirdparty%2Fkmod.git testsuite: Remove trailing ; 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 Link: https://github.com/kmod-project/kmod/pull/274 --- diff --git a/testsuite/test-hash.c b/testsuite/test-hash.c index 35cf06ed..16fe5894 100644 --- a/testsuite/test-hash.c +++ b/testsuite/test-hash.c @@ -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) { @@ -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(); diff --git a/testsuite/test-modinfo.c b/testsuite/test-modinfo.c index 22b6ea12..b936e2fa 100644 --- a/testsuite/test-modinfo.c +++ b/testsuite/test-modinfo.c @@ -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) { @@ -122,6 +122,6 @@ DEFINE_TEST(test_modinfo_builtin, }, .output = { .out = TESTSUITE_ROOTFS "test-modinfo/correct-builtin.txt", - }) + }); TESTSUITE_MAIN(); diff --git a/testsuite/test-util.c b/testsuite/test-util.c index d7bceead..4713fe3d 100644 --- a/testsuite/test-util.c +++ b/testsuite/test-util.c @@ -99,7 +99,8 @@ 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) { @@ -124,7 +125,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) { @@ -158,7 +159,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 @@ -203,7 +204,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) { @@ -220,7 +221,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) { @@ -237,7 +238,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) { @@ -254,7 +255,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) { @@ -292,6 +293,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(); diff --git a/testsuite/testsuite.h b/testsuite/testsuite.h index 2ea50a52..6bd4b28a 100644 --- a/testsuite/testsuite.h +++ b/testsuite/testsuite.h @@ -135,7 +135,7 @@ int test_run(const struct test *t); _alignedptr_ \ static const struct test UNIQ(s##_name) = { \ .name = #_name, .func = _func, ##__VA_ARGS__ \ - }; + } // clang-format on #define DEFINE_TEST(_name, ...) DEFINE_TEST_WITH_FUNC(_name, _name, __VA_ARGS__)