]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
ISC_RUN_TEST_IMPL should use a static declaration
authorMark Andrews <marka@isc.org>
Fri, 23 Jan 2026 04:57:42 +0000 (15:57 +1100)
committerMark Andrews <marka@isc.org>
Wed, 28 Jan 2026 13:43:25 +0000 (00:43 +1100)
These functions don't need to be called from multiple places and
by making them static we will detect when they are not added to the
list functions to be tested.

(cherry picked from commit 22d664aa152f089d5890cd400364400d2aa8e3ae)

tests/include/tests/isc.h
tests/isc/task_test.c

index db0654066b8eb0958ddecf3ae424c85360dc1e67..4d8df514d43e6d15f582a53579c80226f407e3df 100644 (file)
@@ -90,7 +90,7 @@ teardown_managers(void **state);
        int setup_test_##name(void **state __attribute__((unused)));
 
 #define ISC_RUN_TEST_DECLARE(name) \
-       void run_test_##name(void **state __attribute__((unused)));
+       static void run_test_##name(void **state __attribute__((unused)));
 
 #define ISC_TEARDOWN_TEST_DECLARE(name) \
        int teardown_test_##name(void **state __attribute__((unused)))
@@ -99,9 +99,9 @@ teardown_managers(void **state);
        int setup_test_##name(void **state __attribute__((unused))); \
        int setup_test_##name(void **state __attribute__((unused)))
 
-#define ISC_RUN_TEST_IMPL(name)                                     \
-       void run_test_##name(void **state __attribute__((unused))); \
-       void run_test_##name(void **state __attribute__((unused)))
+#define ISC_RUN_TEST_IMPL(name)                                            \
+       static void run_test_##name(void **state __attribute__((unused))); \
+       static void run_test_##name(void **state __attribute__((unused)))
 
 #define ISC_TEARDOWN_TEST_IMPL(name)                                    \
        int teardown_test_##name(void **state __attribute__((unused))); \
index 837564eb0ea6fa0d877d6b14823ca4c04c366419..da23943b9d9cf008c1c9f39903708950844557a8 100644 (file)
@@ -1463,6 +1463,7 @@ ISC_TEST_ENTRY_CUSTOM(privilege_drop, _setup, _teardown)
 ISC_TEST_ENTRY_CUSTOM(privileged_events, _setup, _teardown)
 ISC_TEST_ENTRY_CUSTOM(purge, _setup2, _teardown)
 ISC_TEST_ENTRY_CUSTOM(purgeevent, _setup2, _teardown)
+ISC_TEST_ENTRY_CUSTOM(purgerange, _setup2, _teardown)
 ISC_TEST_ENTRY_CUSTOM(task_shutdown, _setup4, _teardown)
 ISC_TEST_ENTRY_CUSTOM(task_exclusive, _setup4, _teardown)