summaryrefslogtreecommitdiffstats
path: root/libcxx/test/thread/thread.threads/thread.thread.class/thread.thread.constr
diff options
context:
space:
mode:
authorMarshall Clow <mclow@qualcomm.com>2013-03-26 15:28:33 +0000
committerMarshall Clow <mclow@qualcomm.com>2013-03-26 15:28:33 +0000
commita6d24cc19de69872394dab701f27a9f8eddbc4e4 (patch)
tree7cf04e8755c9aa43ef8a002925692e5afeecb190 /libcxx/test/thread/thread.threads/thread.thread.class/thread.thread.constr
parent414ef565bb4ae453a535bcb9f06ba83f88938570 (diff)
downloadbcm5719-llvm-a6d24cc19de69872394dab701f27a9f8eddbc4e4.tar.gz
bcm5719-llvm-a6d24cc19de69872394dab701f27a9f8eddbc4e4.zip
Fixed race conditions in thread tests; exposed by UBSan
llvm-svn: 178029
Diffstat (limited to 'libcxx/test/thread/thread.threads/thread.thread.class/thread.thread.constr')
-rw-r--r--libcxx/test/thread/thread.threads/thread.thread.class/thread.thread.constr/copy.fail.cpp4
-rw-r--r--libcxx/test/thread/thread.threads/thread.thread.class/thread.thread.constr/move.pass.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/libcxx/test/thread/thread.threads/thread.thread.class/thread.thread.constr/copy.fail.cpp b/libcxx/test/thread/thread.threads/thread.thread.class/thread.thread.constr/copy.fail.cpp
index afba0f7e039..f66474c93b4 100644
--- a/libcxx/test/thread/thread.threads/thread.thread.class/thread.thread.constr/copy.fail.cpp
+++ b/libcxx/test/thread/thread.threads/thread.thread.class/thread.thread.constr/copy.fail.cpp
@@ -32,14 +32,14 @@ public:
void operator()()
{
assert(alive_ == 1);
- assert(n_alive == 1);
+ assert(n_alive >= 1);
op_run = true;
}
void operator()(int i, double j)
{
assert(alive_ == 1);
- assert(n_alive == 1);
+ assert(n_alive >= 1);
assert(i == 5);
assert(j == 5.5);
op_run = true;
diff --git a/libcxx/test/thread/thread.threads/thread.thread.class/thread.thread.constr/move.pass.cpp b/libcxx/test/thread/thread.threads/thread.thread.class/thread.thread.constr/move.pass.cpp
index 3d92b594347..17268abf1d5 100644
--- a/libcxx/test/thread/thread.threads/thread.thread.class/thread.thread.constr/move.pass.cpp
+++ b/libcxx/test/thread/thread.threads/thread.thread.class/thread.thread.constr/move.pass.cpp
@@ -32,14 +32,14 @@ public:
void operator()()
{
assert(alive_ == 1);
- assert(n_alive == 1);
+ assert(n_alive >= 1);
op_run = true;
}
void operator()(int i, double j)
{
assert(alive_ == 1);
- assert(n_alive == 1);
+ assert(n_alive >= 1);
assert(i == 5);
assert(j == 5.5);
op_run = true;
OpenPOWER on IntegriCloud