[PATCH] Give libcxx tests temporary filenames that are actually unique.

Dan Albert danalbert at google.com
Mon Aug 18 16:54:48 PDT 2014


================
Comment at: test/support/platform_support.h:55
@@ +54,3 @@
+
+class TempFileName {
+public:
----------------
It's actually a TempFile, not a TempFileName, since you leave the fd open. I think what you actually wanted was to mkstemp(), stash the name and then close the fd (before leaving the constructor).

================
Comment at: test/support/platform_support.h:76
@@ -58,2 +75,3 @@
 #endif
-   return s;
+   std::remove(Name.c_str());
+  }
----------------
I must be missing something here... std::remove() takes three arguments.

http://reviews.llvm.org/D4962






More information about the cfe-commits mailing list