From: Timo Sirainen Date: Wed, 1 Oct 2025 06:54:11 +0000 (+0300) Subject: lib-auth-client: Link tests to all library dependencies X-Git-Tag: 2.4.2~371 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bae8a5961c3c431e167a4dedffba6893ab629c9f;p=thirdparty%2Fdovecot%2Fcore.git lib-auth-client: Link tests to all library dependencies Now that test-auth-master links to libmaster, remove duplicate symbols from it. And since it's now using the real master_service_is_killed(), master_service must be non-NULL. --- diff --git a/src/Makefile.am b/src/Makefile.am index 8fb76b7fcf..8e869f5ecb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -17,10 +17,10 @@ LIBDOVECOT_SUBDIRS = \ lib-settings \ lib-otp \ lib-auth \ - lib-auth-client \ lib-dns-client \ lib-ssl-iostream \ lib-master \ + lib-auth-client \ lib-login \ lib-charset \ lib-json \ diff --git a/src/lib-auth-client/Makefile.am b/src/lib-auth-client/Makefile.am index acd2e54dc3..402b037294 100644 --- a/src/lib-auth-client/Makefile.am +++ b/src/lib-auth-client/Makefile.am @@ -34,9 +34,12 @@ noinst_PROGRAMS = $(test_programs) test_libs = \ $(noinst_LTLIBRARIES) \ + ../lib-master/libmaster.la \ + ../lib-ssl-iostream/libssl_iostream.la \ ../lib-settings/libsettings.la \ ../lib-dns/libdns.la \ ../lib-var-expand/libvar_expand.la \ + ../lib-regex/libdregex.la \ ../lib-test/libtest.la \ ../lib/liblib.la \ $(MODULE_LIBS) diff --git a/src/lib-auth-client/test-auth-master.c b/src/lib-auth-client/test-auth-master.c index 155243d653..a0ed073d9e 100644 --- a/src/lib-auth-client/test-auth-master.c +++ b/src/lib-auth-client/test-auth-master.c @@ -14,7 +14,7 @@ #include "write-full.h" #include "connection.h" #include "master-interface.h" -#include "master-service.h" +#include "master-service-private.h" #include "test-common.h" #include "test-subprocess.h" @@ -25,8 +25,6 @@ #define TEST_SOCKET "./auth-master-test" #define SERVER_KILL_TIMEOUT_SECS 20 -struct master_service *master_service = NULL; - static void main_deinit(void); /* @@ -1902,11 +1900,6 @@ static void main_deinit(void) /* nothing yet; also called from sub-processes */ } -bool master_service_is_killed(struct master_service *service ATTR_UNUSED) -{ - return FALSE; -} - int main(int argc, char *argv[]) { int c; @@ -1914,6 +1907,9 @@ int main(int argc, char *argv[]) lib_init(); main_init(); + /* A bit ugly way to initialize master_service. We just need it to + not be NULL for master_service_is_killed(). */ + master_service = t_new(struct master_service, 1); while ((c = getopt(argc, argv, "D")) > 0) { switch (c) {