summaryrefslogtreecommitdiff
path: root/tests/test_atomic.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2012-09-18 14:54:48 +0400
committerIvan Maidanski <ivmai@mail.ru>2012-09-18 14:54:48 +0400
commitebaf32fcb8ebb922bcc4e28ad49fabe3de126e9e (patch)
treed4acee8ff04afa34db16417f5f360a8509c8596e /tests/test_atomic.c
parent23862ab6ff8615d649fc85d1a5f8fd8c452ec302 (diff)
downloadlibatomic_ops-ebaf32fcb8ebb922bcc4e28ad49fabe3de126e9e.tar.gz
Terminate tests with abort after error reported
* tests/test_atomic.c (acqrel_thr): Call abort() after fprintf(stderr). * tests/test_malloc.c (run_one_test): Likewise. * tests/test_stack.c (check_list, main): Likewise.
Diffstat (limited to 'tests/test_atomic.c')
-rw-r--r--tests/test_atomic.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_atomic.c b/tests/test_atomic.c
index 7356deb..30dbc05 100644
--- a/tests/test_atomic.c
+++ b/tests/test_atomic.c
@@ -76,7 +76,10 @@ void * acqrel_thr(void *id)
{
AO_t my_counter1;
if (me != 1)
- fprintf(stderr, "acqrel test: too many threads\n");
+ {
+ fprintf(stderr, "acqrel test: too many threads\n");
+ abort();
+ }
my_counter1 = AO_load(&counter1);
AO_store(&counter1, my_counter1 + 1);
AO_store_release_write(&counter2, my_counter1 + 1);