From: Mark Andrews Date: Fri, 23 Jan 2026 04:57:42 +0000 (+1100) Subject: ISC_RUN_TEST_IMPL should use a static declaration X-Git-Tag: v9.18.45~2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=837fc382b4ac4627c8c52ff6a5d40bc3266cc760;p=thirdparty%2Fbind9.git ISC_RUN_TEST_IMPL should use a static declaration 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) --- diff --git a/tests/include/tests/isc.h b/tests/include/tests/isc.h index db0654066b8..4d8df514d43 100644 --- a/tests/include/tests/isc.h +++ b/tests/include/tests/isc.h @@ -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))); \ diff --git a/tests/isc/task_test.c b/tests/isc/task_test.c index 837564eb0ea..da23943b9d9 100644 --- a/tests/isc/task_test.c +++ b/tests/isc/task_test.c @@ -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)