]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tests: drop _weak_ from the SYSTEMD_TEST_TABLE definition
authorZbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>
Thu, 19 Mar 2026 10:44:40 +0000 (11:44 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 20 Mar 2026 08:59:58 +0000 (09:59 +0100)
This will cause test binaries that reference SYSTEMD_TEST_TABLE,
e.g. by trying to iterate over the test list, to fail if no tests are
defined. I think this is the correct thing to do, as the lack of tests
indicates some kind of mistake.

src/shared/tests.h

index ae57cab3863c5c4bb6a8c2480ab13eed1f5fe69d..607d62fe6aa0e311dc5b8928353815d2032b00e7 100644 (file)
@@ -110,8 +110,8 @@ typedef struct TestFunc {
                 ##__VA_ARGS__                                                                           \
         }
 
-extern const TestFunc _weak_ __start_SYSTEMD_TEST_TABLE[];
-extern const TestFunc _weak_ __stop_SYSTEMD_TEST_TABLE[];
+extern const TestFunc __start_SYSTEMD_TEST_TABLE[];
+extern const TestFunc __stop_SYSTEMD_TEST_TABLE[];
 
 #define TEST(name, ...)                            \
         static void test_##name(void);             \