diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2018-12-18 17:07:29 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2018-12-18 17:20:15 +0400 |
commit | b0fd06a6f27212cee770961171439a44626d8f14 (patch) | |
tree | ffd043e390f1e400f4d67ab52553a8a04e8805bc /unittest/mysys/my_atomic-t.c | |
parent | 65525550ab8988a1a1a36d0403824ebaec160347 (diff) | |
download | mariadb-git-b0fd06a6f27212cee770961171439a44626d8f14.tar.gz |
MDEV-15670 - unit.my_atomic failed in buildbot with Signal 11 thrown
Workaround glibc bug: https://sourceware.org/bugzilla/show_bug.cgi?id=20116
by making unittest threads joinable. It makes code better anyway.
Diffstat (limited to 'unittest/mysys/my_atomic-t.c')
-rw-r--r-- | unittest/mysys/my_atomic-t.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/unittest/mysys/my_atomic-t.c b/unittest/mysys/my_atomic-t.c index 35e782eb360..5eb988e2e15 100644 --- a/unittest/mysys/my_atomic-t.c +++ b/unittest/mysys/my_atomic-t.c @@ -35,9 +35,6 @@ pthread_handler_t test_atomic_add(void *arg) my_atomic_add32(&bad, -x); my_atomic_rwlock_wrunlock(&rwl); } - pthread_mutex_lock(&mutex); - if (!--running_threads) pthread_cond_signal(&cond); - pthread_mutex_unlock(&mutex); return 0; } @@ -58,13 +55,6 @@ pthread_handler_t test_atomic_add64(void *arg) my_atomic_add64(&a64, -x); my_atomic_rwlock_wrunlock(&rwl); } - pthread_mutex_lock(&mutex); - if (!--running_threads) - { - bad= (a64 != 0); - pthread_cond_signal(&cond); - } - pthread_mutex_unlock(&mutex); return 0; } @@ -108,9 +98,6 @@ pthread_handler_t test_atomic_fas(void *arg) my_atomic_add32(&bad, -x); my_atomic_rwlock_wrunlock(&rwl); - pthread_mutex_lock(&mutex); - if (!--running_threads) pthread_cond_signal(&cond); - pthread_mutex_unlock(&mutex); return 0; } @@ -140,9 +127,6 @@ pthread_handler_t test_atomic_cas(void *arg) my_atomic_rwlock_wrunlock(&rwl); } while (!ok) ; } - pthread_mutex_lock(&mutex); - if (!--running_threads) pthread_cond_signal(&cond); - pthread_mutex_unlock(&mutex); return 0; } @@ -178,6 +162,7 @@ void do_tests() } a64=0; test_concurrently("my_atomic_add64", test_atomic_add64, THREADS, CYCLES); + bad= (a64 != 0); my_atomic_rwlock_destroy(&rwl); } |