]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http, lib-smtp: test-*-payload - Skip files created by make check
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Sat, 25 Oct 2025 16:38:14 +0000 (19:38 +0300)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 10 Nov 2025 12:12:12 +0000 (12:12 +0000)
These may change during "make check", breaking the test.

src/lib-http/test-http-payload.c
src/lib-smtp/test-smtp-payload.c

index 07afb5b21a79c6a40fe153b9a58668023a62eebd..2759ceabc03a3b81dd6df0d4d452ccca74c40159 100644 (file)
@@ -125,6 +125,11 @@ static void test_files_read_dir(const char *path)
                    dp->d_name[strcspn(dp->d_name, unsafe_characters)] != '\0')
                        continue;
 
+               if (str_ends_with(dp->d_name, ".tmp") ||
+                   str_ends_with(dp->d_name, ".log") ||
+                   str_ends_with(dp->d_name, ".trs"))
+                       continue;
+
                file = t_abspath_to(dp->d_name, path);
                if (stat(file, &st) == 0) {
                        if (S_ISREG(st.st_mode)) {
index b4a6263e59000a769f15f6df434d14ddbec2ec3e..5329331e598e7b2866da209e396b29fa2c381ef1 100644 (file)
@@ -103,6 +103,11 @@ static void test_files_read_dir(const char *path)
                if (*dp->d_name == '.')
                        continue;
 
+               if (str_ends_with(dp->d_name, ".tmp") ||
+                   str_ends_with(dp->d_name, ".log") ||
+                   str_ends_with(dp->d_name, ".trs"))
+                       continue;
+
                file = t_abspath_to(dp->d_name, path);
                if (stat(file, &st) == 0) {
                        if (S_ISREG(st.st_mode)) {