]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: test-smtp-submit - Use the new test-dir API
authorStephan Bosch <stephan.bosch@open-xchange.com>
Sat, 1 Nov 2025 16:42:56 +0000 (17:42 +0100)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Wed, 5 Nov 2025 10:17:48 +0000 (10:17 +0000)
src/lib-smtp/test-smtp-submit.c

index 5132fda3e4f6338845676e3eeb8e104c8df239db..a146c39881d499c2c1371e56873306d4d0eedbc3 100644 (file)
@@ -15,6 +15,7 @@
 #include "master-service.h"
 #include "istream-dot.h"
 #include "test-common.h"
+#include "test-dir.h"
 #include "test-subprocess.h"
 
 #include "smtp-address.h"
@@ -2002,7 +2003,9 @@ static int test_open_server_fd(in_port_t *bind_port)
 
 static void test_tmp_dir_init(void)
 {
-       tmp_dir = i_strdup_printf("/tmp/dovecot-test-smtp-client.%s.%s",
+       static unsigned int seq = 0;
+
+       tmp_dir = i_strdup_printf("%s/test-%u.%s.%s", test_dir_get(), seq++,
                                  dec2str(time(NULL)), dec2str(getpid()));
 }
 
@@ -2192,6 +2195,7 @@ int main(int argc, char *argv[])
 
        test_init();
        event_set_forced_debug(test_event, debug);
+       test_dir_init("smtp-submit");
        test_subprocesses_init();
 
        /* listen on localhost */