]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-sasl: test-sasl-authentication - Create an ioloop
authorStephan Bosch <stephan.bosch@open-xchange.com>
Tue, 14 Oct 2025 21:05:53 +0000 (23:05 +0200)
committerStephan Bosch <stephan.bosch@open-xchange.com>
Tue, 14 Oct 2025 21:44:34 +0000 (23:44 +0200)
Winbind needs this to initiate some async stuff that is not part of this test,
so the ioloop is never actually run. However, in its absence a segfault crash
occurs.

src/lib-sasl/test-sasl-authentication.c

index 4af3e44132a555d5f54c6a3bfc299a6ce3d39648..4a9451435c46e21abfeb67bf10659cdbb375a4a8 100644 (file)
@@ -5,6 +5,7 @@
 #include "str.h"
 #include "base64.h"
 #include "randgen.h"
+#include "ioloop.h"
 #include "test-common.h"
 #include "password-scheme.h"
 #include "gssapi-dummy.h"
@@ -1584,6 +1585,7 @@ int main(int argc, char *argv[])
                test_sasl_bad_credentials,
                NULL
        };
+       struct ioloop *ioloop;
        bool debug = FALSE;
        int ret, c;
 
@@ -1609,7 +1611,9 @@ int main(int argc, char *argv[])
        dsasl_clients_init_gssapi();
 #endif
 
+       ioloop = io_loop_create();
        ret = test_run(test_functions);
+       io_loop_destroy(&ioloop);
 
        dsasl_clients_deinit();
        password_schemes_deinit();