From: Stephan Bosch Date: Sat, 1 Nov 2025 16:42:56 +0000 (+0100) Subject: lib-smtp: test-smtp-submit - Use the new test-dir API X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b1461b2079bccb4fce01b203e47ad3b4c4dd184e;p=thirdparty%2Fdovecot%2Fcore.git lib-smtp: test-smtp-submit - Use the new test-dir API --- diff --git a/src/lib-smtp/test-smtp-submit.c b/src/lib-smtp/test-smtp-submit.c index 5132fda3e4..a146c39881 100644 --- a/src/lib-smtp/test-smtp-submit.c +++ b/src/lib-smtp/test-smtp-submit.c @@ -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 */