[libcxx-commits] [libcxx] 8a21e0c - [libc++] [test] Remove `UNSUPPORTED: stdlib=msvc` from lock.pass.cpp.

Arthur O'Dwyer via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jan 8 13:03:53 PST 2022


Author: Arthur O'Dwyer
Date: 2022-01-08T16:03:30-05:00
New Revision: 8a21e0c10cc83b8ac16241bbe31cb0ad60bc34aa

URL: https://github.com/llvm/llvm-project/commit/8a21e0c10cc83b8ac16241bbe31cb0ad60bc34aa
DIFF: https://github.com/llvm/llvm-project/commit/8a21e0c10cc83b8ac16241bbe31cb0ad60bc34aa.diff

LOG: [libc++] [test] Remove `UNSUPPORTED: stdlib=msvc` from lock.pass.cpp.

Casey Carter says, "We run std/thread/thread.mutex/thread.lock.algorithm/lock.pass.cpp
on every CI and it works fine with MSVC STL. I'm guessing this annotation predates
Billy's rewrite of std::lock in 2017-ish."

Differential Revision: https://reviews.llvm.org/D116712

Added: 
    

Modified: 
    libcxx/test/std/thread/thread.mutex/thread.lock.algorithm/lock.pass.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/test/std/thread/thread.mutex/thread.lock.algorithm/lock.pass.cpp b/libcxx/test/std/thread/thread.mutex/thread.lock.algorithm/lock.pass.cpp
index ccf476c81c9d..8dd837b0a06c 100644
--- a/libcxx/test/std/thread/thread.mutex/thread.lock.algorithm/lock.pass.cpp
+++ b/libcxx/test/std/thread/thread.mutex/thread.lock.algorithm/lock.pass.cpp
@@ -8,10 +8,14 @@
 //
 // UNSUPPORTED: libcpp-has-no-threads
 
-// This test hangs forever when built against libstdc++ and MSVC. In order to allow
-// validation of the test suite against other STLs we have to mark it
-// unsupported.
-// UNSUPPORTED: stdlib=libstdc++, stdlib=msvc
+// This test hangs forever when built against libstdc++ (Oct 2016).
+// UNSUPPORTED: stdlib=libstdc++
+
+// This test isn't quite standards-conforming: it's testing our specific
+// algorithm, where when lx.try_lock() fails we start the next attempt
+// with an unconditional lx.lock(). Thus our algorithm can handle a list
+// of mutexes where at-most-one of them is of the evil type `class L1`,
+// but will loop forever if two or more of them are `class L1`.
 
 // <mutex>
 


        


More information about the libcxx-commits mailing list