hanchenye-llvm-project/libcxx/test/support
Dan Albert 0bb696800f PR20546: Fix tests for compare_exchange_weak.
These calls are allowed to fail spuriously.

29.6.5.25:

    Remark: A weak compare-and-exchange operation may fail spuriously.
    That is, even when the contents of memory referred to by expected
    and object are equal, it may return false and store back to expected
    the same memory contents that were originally there. [ Note: This
    spurious failure enables implementation of compare and-exchange on a
    broader class of machines, e.g., load-locked store-conditional
    machines. A consequence of spurious failure is that nearly all uses
    of weak compare-and-exchange will be in a loop.

To fix this, we replace any assert() that expects
std::atomic::compare_exchange_weak() to return true with a loop. If the
call does not return true within N runs (with N currently equal to 10),
then the test fails.

http://llvm.org/bugs/show_bug.cgi?id=20546

llvm-svn: 217319
2014-09-06 20:38:25 +00:00
..
DefaultOnly.h
allocators.h
asan_testing.h [asan] Make vector asan annotations exception-friendly 2014-09-02 23:43:38 +00:00
cmpxchg_loop.h PR20546: Fix tests for compare_exchange_weak. 2014-09-06 20:38:25 +00:00
constexpr_char_traits.hpp Mark assign to be constepr only in c++14; can't have constexpr fns that return void in C++11 2014-06-10 18:52:57 +00:00
counting_predicates.hpp Fix PR#202520 - predicate called too many times in list::remove_if. Add tests for list, forward_list, and the std::remove_if algorithm 2014-08-04 17:32:25 +00:00
hexfloat.h
min_allocator.h Add bare_allocator archetype that implements the minimal possible allocator interface. 2014-08-15 04:15:41 +00:00
nasty_containers.hpp
nothing_to_do.pass.cpp test commit 2014-07-24 18:41:56 +00:00
platform_support.h fix missing include for ::close in platform_support.h 2014-08-19 17:52:40 +00:00
private_constructor.hpp
test_allocator.h
test_iterators.h