]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
testsuite: tweak __{start,stop}_kmod_tests declaration
authorEmil Velikov <emil.l.velikov@gmail.com>
Sat, 18 Jul 2026 12:53:50 +0000 (13:53 +0100)
committerLucas De Marchi <ldemarchi@kernel.org>
Tue, 28 Jul 2026 14:11:03 +0000 (09:11 -0500)
Const annotate the struct (we don't/cannot modify them) and drop the no
longer needed hidden attribute.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/450
Signed-off-by: Lucas De Marchi <ldemarchi@kernel.org>
testsuite/testsuite.h

index 827415c575c73b26f9032840bb9c4d0eb888c3fb..304b0b6aa47b0af1a699a922868180de99a39af6 100644 (file)
@@ -136,8 +136,8 @@ int test_run(const struct test *t);
 #define DEFINE_TEST(_name, ...) DEFINE_TEST_WITH_FUNC(_name, _name, __VA_ARGS__)
 
 #define TESTSUITE_MAIN()                                                                 \
-       extern struct test __start_kmod_tests[] __attribute__((visibility("hidden")));   \
-       extern struct test __stop_kmod_tests[] __attribute__((visibility("hidden")));    \
+       extern const struct test __start_kmod_tests[];                                   \
+       extern const struct test __stop_kmod_tests[];                                    \
        int main(int argc, char *argv[])                                                 \
        {                                                                                \
                const struct test *t;                                                    \