[Lldb-commits] [lldb] r205246 - Workaround test trace output dir creation race condition

Ed Maste emaste at freebsd.org
Mon Mar 31 13:36:38 PDT 2014


Author: emaste
Date: Mon Mar 31 15:36:38 2014
New Revision: 205246

URL: http://llvm.org/viewvc/llvm-project?rev=205246&view=rev
Log:
Workaround test trace output dir creation race condition

Since dosep.ty started invoking multiple tests in parallel, the FreeBSD
buildbot occasionally has a failure due to os.mkdir returning EEXIST.
Silently ignore that exception, but reraise any other.

Modified:
    lldb/trunk/test/dotest.py

Modified: lldb/trunk/test/dotest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dotest.py?rev=205246&r1=205245&r2=205246&view=diff
==============================================================================
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Mon Mar 31 15:36:38 2014
@@ -1336,7 +1336,11 @@ if not noHeaders:
     sys.stderr.write("Command invoked: %s\n" % getMyCommandLine())
 
 if not os.path.isdir(sdir_name):
-    os.mkdir(sdir_name)
+    try:
+        os.mkdir(sdir_name)
+    except OSError as exception:
+        if exception.errno != errno.EEXIST:
+            raise
 where_to_save_session = os.getcwd()
 fname = os.path.join(sdir_name, "TestStarted")
 with open(fname, "w") as f:





More information about the lldb-commits mailing list