[test-suite] r237924 - Adding testing for Bug 2349 Fix
Nemanja Ivanovic
nemanja.i.ibm at gmail.com
Thu May 21 11:17:30 PDT 2015
Author: nemanjai
Date: Thu May 21 13:17:29 2015
New Revision: 237924
URL: http://llvm.org/viewvc/llvm-project?rev=237924&view=rev
Log:
Adding testing for Bug 2349 Fix
http://reviews.llvm.org/D9778
In order to prevent a similar run-time failure in the future, add the test from
the bug report.
Added:
test-suite/trunk/SingleSource/UnitTests/C++11/
test-suite/trunk/SingleSource/UnitTests/C++11/Makefile
test-suite/trunk/SingleSource/UnitTests/C++11/stdthreadbug.cpp
test-suite/trunk/SingleSource/UnitTests/C++11/stdthreadbug.reference_output
Modified:
test-suite/trunk/SingleSource/UnitTests/Makefile
Added: test-suite/trunk/SingleSource/UnitTests/C++11/Makefile
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/C%2B%2B11/Makefile?rev=237924&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/UnitTests/C++11/Makefile (added)
+++ test-suite/trunk/SingleSource/UnitTests/C++11/Makefile Thu May 21 13:17:29 2015
@@ -0,0 +1,12 @@
+# SingleSource/UnitTests/C++11/Makefile
+LEVEL = ../../..
+include $(LEVEL)/Makefile.config
+
+CPPFLAGS += -std=c++11 -pthread
+
+ifdef BENCHMARKING_ONLY
+PROGRAMS_TO_SKIP += stdthreadbug
+endif
+
+LDFLAGS += -lstdc++ -pthread
+include $(LEVEL)/SingleSource/Makefile.singlesrc
Added: test-suite/trunk/SingleSource/UnitTests/C++11/stdthreadbug.cpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/C%2B%2B11/stdthreadbug.cpp?rev=237924&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/UnitTests/C++11/stdthreadbug.cpp (added)
+++ test-suite/trunk/SingleSource/UnitTests/C++11/stdthreadbug.cpp Thu May 21 13:17:29 2015
@@ -0,0 +1,15 @@
+#if defined(_LITTLE_ENDIAN) && defined(__PPC64__)
+#include <thread>
+
+int main()
+{
+ std::thread t([](){});
+ t.join();
+ return 0;
+}
+#else
+int main()
+{
+ return 0;
+}
+#endif
Added: test-suite/trunk/SingleSource/UnitTests/C++11/stdthreadbug.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/C%2B%2B11/stdthreadbug.reference_output?rev=237924&view=auto
==============================================================================
--- test-suite/trunk/SingleSource/UnitTests/C++11/stdthreadbug.reference_output (added)
+++ test-suite/trunk/SingleSource/UnitTests/C++11/stdthreadbug.reference_output Thu May 21 13:17:29 2015
@@ -0,0 +1 @@
+exit 0
Modified: test-suite/trunk/SingleSource/UnitTests/Makefile
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/Makefile?rev=237924&r1=237923&r2=237924&view=diff
==============================================================================
--- test-suite/trunk/SingleSource/UnitTests/Makefile (original)
+++ test-suite/trunk/SingleSource/UnitTests/Makefile Thu May 21 13:17:29 2015
@@ -7,10 +7,10 @@ DIRS := SetjmpLongjmp
# FIXME: Disable SJLJ tests for now, until EH edges are represented.
DIRS :=
-DIRS += Vector
+DIRS += Vector
DIRS += Vectorizer
-DIRS += SignlessTypes Threads
+DIRS += SignlessTypes Threads C++11
# Only test Obj-C on Darwin.
ifeq ($(TARGET_OS),Darwin)
More information about the llvm-commits
mailing list