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 22d664aa15)
This commit is contained in:
Mark Andrews 2026-01-23 15:57:42 +11:00
parent 635a3d6824
commit 837fc382b4
2 changed files with 5 additions and 4 deletions

View 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))); \

View 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)