You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by he...@apache.org on 2023/02/27 18:38:29 UTC
svn commit: r1907898 - /spamassassin/trunk/t/SATest.pm
Author: hege
Date: Mon Feb 27 18:38:29 2023
New Revision: 1907898
URL: http://svn.apache.org/viewvc?rev=1907898&view=rev
Log:
Prevent mkdir race condition from parallel tests
Modified:
spamassassin/trunk/t/SATest.pm
Modified: spamassassin/trunk/t/SATest.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/SATest.pm?rev=1907898&r1=1907897&r2=1907898&view=diff
==============================================================================
--- spamassassin/trunk/t/SATest.pm (original)
+++ spamassassin/trunk/t/SATest.pm Mon Feb 27 18:38:29 2023
@@ -203,9 +203,8 @@ sub sa_t_init {
(-f "t/test_dir") && chdir("t"); # run from ..
-f "test_dir" or die "FATAL: not in test directory?\n";
- unless (-d "log") {
- mkdir ("log", 0755) or die ("Error creating log dir: $!");
- }
+ mkdir ("log", 0755);
+ -d "log" or die "FATAL: failed to create log dir\n";
chmod (0755, "log"); # set in case log already exists with wrong permissions
if (!$RUNNING_ON_WINDOWS) {