]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-auth-client: Link tests to all library dependencies
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 1 Oct 2025 06:54:11 +0000 (09:54 +0300)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Wed, 1 Oct 2025 12:58:32 +0000 (12:58 +0000)
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.

src/Makefile.am
src/lib-auth-client/Makefile.am
src/lib-auth-client/test-auth-master.c

index 8fb76b7fcff362e572d402bf2054d7d7458d82fc..8e869f5ecb02cbf8853b4526b61d1ec3b078da73 100644 (file)
@@ -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 \
index acd2e54dc31261335897d9fd61b1ea24a8d750f8..402b037294d52cebdbd32dbad9ab8f56dc3e525c 100644 (file)
@@ -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)
index 155243d6531baedca2a12e01fb6c18677ecd874b..a0ed073d9ea97e97c874277935662dd165821afb 100644 (file)
@@ -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) {