Module: xenomai-3
Branch: master
Commit: f3500a21faaed3b0bafa11456684b939f8738c15
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=f3500a21faaed3b0bafa11456684b939f8738c15

Author: Philippe Gerum <r...@xenomai.org>
Date:   Sun Jun 21 12:25:03 2015 +0200

alchemy/testsuite: use traceobj_check() when applicable

---

 lib/alchemy/testsuite/alarm-1.c  |   14 ++++++-------
 lib/alchemy/testsuite/buffer-1.c |   16 +++++++--------
 lib/alchemy/testsuite/event-1.c  |   28 +++++++++++++-------------
 lib/alchemy/testsuite/heap-1.c   |   36 +++++++++++++++++-----------------
 lib/alchemy/testsuite/heap-2.c   |   24 +++++++++++------------
 lib/alchemy/testsuite/mq-1.c     |   30 ++++++++++++++--------------
 lib/alchemy/testsuite/mq-2.c     |   10 +++++-----
 lib/alchemy/testsuite/mq-3.c     |   16 +++++++--------
 lib/alchemy/testsuite/mutex-1.c  |   38 ++++++++++++++++++------------------
 lib/alchemy/testsuite/pipe-1.c   |   12 ++++++------
 lib/alchemy/testsuite/sem-1.c    |   40 +++++++++++++++++++-------------------
 lib/alchemy/testsuite/sem-2.c    |   12 ++++++------
 lib/alchemy/testsuite/task-1.c   |    4 ++--
 lib/alchemy/testsuite/task-10.c  |   14 ++++++-------
 lib/alchemy/testsuite/task-2.c   |   20 +++++++++----------
 lib/alchemy/testsuite/task-3.c   |   20 +++++++++----------
 lib/alchemy/testsuite/task-4.c   |   22 ++++++++++-----------
 lib/alchemy/testsuite/task-5.c   |   22 ++++++++++-----------
 lib/alchemy/testsuite/task-6.c   |   10 +++++-----
 lib/alchemy/testsuite/task-7.c   |   20 +++++++++----------
 lib/alchemy/testsuite/task-8.c   |   16 +++++++--------
 lib/alchemy/testsuite/task-9.c   |   16 +++++++--------
 22 files changed, 220 insertions(+), 220 deletions(-)

diff --git a/lib/alchemy/testsuite/alarm-1.c b/lib/alchemy/testsuite/alarm-1.c
index 6f62e59..29b3bbe 100644
--- a/lib/alchemy/testsuite/alarm-1.c
+++ b/lib/alchemy/testsuite/alarm-1.c
@@ -27,10 +27,10 @@ static void alarm_handler(void *arg)
 
        if (++hits >= 3) {
                ret = rt_alarm_stop(&alrm);
-               traceobj_assert(&trobj, ret == 0);
+               traceobj_check(&trobj, ret, 0);
                traceobj_mark(&trobj, 2);
                ret = rt_task_resume(&t_main);
-               traceobj_assert(&trobj, ret == 0);
+               traceobj_check(&trobj, ret, 0);
                traceobj_mark(&trobj, 3);
                return;
        }
@@ -51,17 +51,17 @@ static void main_task(void *arg)
        traceobj_mark(&trobj, 5);
 
        ret = rt_alarm_start(&alrm, 200000000ULL, 200000000ULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 6);
 
        ret = rt_task_suspend(&t_main);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 7);
 
        ret = rt_alarm_delete(&alrm);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_exit(&trobj);
 }
@@ -73,10 +73,10 @@ int main(int argc, char *const argv[])
        traceobj_init(&trobj, argv[0], sizeof(tseq) / sizeof(int));
 
        ret = rt_alarm_create(&alrm, "ALARM", alarm_handler, &alrm);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_spawn(&t_main, "main_task", 0,  50, 0, main_task, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 8);
 
diff --git a/lib/alchemy/testsuite/buffer-1.c b/lib/alchemy/testsuite/buffer-1.c
index 49a439f..d6d1d9a 100644
--- a/lib/alchemy/testsuite/buffer-1.c
+++ b/lib/alchemy/testsuite/buffer-1.c
@@ -79,28 +79,28 @@ int main(int argc, char *const argv[])
        traceobj_init(&trobj, argv[0], 0);
 
        ret = rt_buffer_create(&buffer, NULL, 2, B_FIFO);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_shadow(NULL, "main_task", 30, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_create(&t_fgnd, "FGND", 0,  20, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_start(&t_fgnd, foreground_task, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_create(&t_bgnd, "BGND", 0,  10, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_start(&t_bgnd, background_task, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_sleep(1500000000ULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_buffer_delete(&buffer);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_join(&trobj);
 
diff --git a/lib/alchemy/testsuite/event-1.c b/lib/alchemy/testsuite/event-1.c
index 042281d..fdf9627 100644
--- a/lib/alchemy/testsuite/event-1.c
+++ b/lib/alchemy/testsuite/event-1.c
@@ -20,16 +20,16 @@ static void background_task(void *arg)
        for (n = 0; n < 10; n++) {
                flags = 0;
                ret = rt_event_wait(&event, 0x55555, &flags, EV_ANY, 
TM_INFINITE);
-               traceobj_assert(&trobj, ret == 0);
+               traceobj_check(&trobj, ret, 0);
                traceobj_assert(&trobj, flags == 1 << n * 2);
                ret = rt_event_clear(&event, flags, NULL);
-               traceobj_assert(&trobj, ret == 0);
+               traceobj_check(&trobj, ret, 0);
                ret = rt_event_signal(&event, 2 << n * 2);
-               traceobj_assert(&trobj, ret == 0);
+               traceobj_check(&trobj, ret, 0);
        }
 
        ret = rt_event_wait(&event, 0x55555, &flags, EV_ANY, TM_INFINITE);
-       traceobj_assert(&trobj, ret == -EIDRM);
+       traceobj_check(&trobj, ret, -EIDRM);
 
        traceobj_exit(&trobj);
 }
@@ -44,19 +44,19 @@ static void foreground_task(void *arg)
        for (n = 0; n < 10; n++) {
                flags = 0;
                ret = rt_event_signal(&event, 1 << n * 2);
-               traceobj_assert(&trobj, ret == 0);
+               traceobj_check(&trobj, ret, 0);
                ret = rt_event_wait(&event, 2 << n * 2, &flags, EV_ALL, 
TM_NONBLOCK);
-               traceobj_assert(&trobj, ret == -EWOULDBLOCK);
+               traceobj_check(&trobj, ret, -EWOULDBLOCK);
                ret = rt_event_wait(&event, 2 << n * 2, &flags, EV_ALL, 
TM_INFINITE);
-               traceobj_assert(&trobj, ret == 0);
+               traceobj_check(&trobj, ret, 0);
                traceobj_assert(&trobj, flags == 2 << n * 2);
                ret = rt_event_clear(&event, flags, NULL);
-               traceobj_assert(&trobj, ret == 0);
+               traceobj_check(&trobj, ret, 0);
        }
 
        rt_task_sleep(1000000ULL);
        ret = rt_event_delete(&event);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_exit(&trobj);
 }
@@ -68,19 +68,19 @@ int main(int argc, char *const argv[])
        traceobj_init(&trobj, argv[0], 0);
 
        ret = rt_event_create(&event, "EVENT", 0, EV_FIFO);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_create(&t_bgnd, "BGND", 0,  20, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_start(&t_bgnd, background_task, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_create(&t_fgnd, "FGND", 0,  21, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_start(&t_fgnd, foreground_task, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_join(&trobj);
 
diff --git a/lib/alchemy/testsuite/heap-1.c b/lib/alchemy/testsuite/heap-1.c
index c116f1f..48bc4a5 100644
--- a/lib/alchemy/testsuite/heap-1.c
+++ b/lib/alchemy/testsuite/heap-1.c
@@ -24,21 +24,21 @@ static void background_task(void *arg)
 
        traceobj_mark(&trobj, 7);
        ret = rt_heap_bind(&heap, "HEAP", TM_INFINITE);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
        traceobj_mark(&trobj, 8);
 
        ret = rt_heap_alloc(&heap, 8192, TM_NONBLOCK, &p1);
        traceobj_mark(&trobj, 9);
-       traceobj_assert(&trobj, ret == -EWOULDBLOCK);
+       traceobj_check(&trobj, ret, -EWOULDBLOCK);
        ret = rt_heap_alloc(&heap, 8192, TM_INFINITE, &p1);
        traceobj_mark(&trobj, 10);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
        ret = rt_heap_alloc(&heap, 8192, TM_NONBLOCK, &p2);
        traceobj_mark(&trobj, 11);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
        ret = rt_heap_alloc(&heap, 8192, TM_INFINITE, &p1);
        traceobj_mark(&trobj, 12);
-       traceobj_assert(&trobj, ret == -EIDRM);
+       traceobj_check(&trobj, ret, -EIDRM);
 
        traceobj_exit(&trobj);
 }
@@ -53,32 +53,32 @@ static void foreground_task(void *arg)
 
        traceobj_mark(&trobj, 1);
        ret = rt_heap_bind(&heap, "HEAP", TM_INFINITE);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
        traceobj_mark(&trobj, 2);
 
        ret = rt_heap_alloc(&heap, 8192, TM_NONBLOCK, &p1);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
        traceobj_mark(&trobj, 3);
        ret = rt_heap_alloc(&heap, 8192, TM_NONBLOCK, &p2);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
        traceobj_mark(&trobj, 4);
 
        ret = rt_task_set_priority(NULL, 19);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
        traceobj_mark(&trobj, 5);
        ret = rt_task_set_priority(NULL, 21);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
        traceobj_mark(&trobj, 6);
 
        ret = rt_heap_free(&heap, p1);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
        ret = rt_heap_free(&heap, p2);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        rt_task_sleep(1000000ULL);
 
        ret = rt_heap_delete(&heap);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_exit(&trobj);
 }
@@ -91,19 +91,19 @@ int main(int argc, char *const argv[])
        traceobj_init(&trobj, argv[0], sizeof(tseq) / sizeof(int));
 
        ret = rt_task_create(&t_fgnd, "FGND", 0,  21, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_create(&t_bgnd, "BGND", 0,  20, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_start(&t_bgnd, background_task, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_start(&t_fgnd, foreground_task, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_heap_create(&heap, "HEAP", 16384, H_PRIO);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_join(&trobj);
 
diff --git a/lib/alchemy/testsuite/heap-2.c b/lib/alchemy/testsuite/heap-2.c
index 9a4ed42..ad67afb 100644
--- a/lib/alchemy/testsuite/heap-2.c
+++ b/lib/alchemy/testsuite/heap-2.c
@@ -27,14 +27,14 @@ static void pull_task(void *arg)
 
        while (n++ < 1000) {
                ret = rt_heap_alloc(&heap1, MSGSIZE, TM_INFINITE, &p);
-               traceobj_assert(&trobj, ret == 0);
+               traceobj_check(&trobj, ret, 0);
                ret = rt_queue_write(&queue1, &p, sizeof(p), Q_NORMAL);
                traceobj_assert(&trobj, ret >= 0);
 
                ret = rt_queue_read(&queue2, &p, sizeof(p), TM_INFINITE);
                traceobj_assert(&trobj, ret == sizeof(p));
                ret = rt_heap_free(&heap2, p);
-               traceobj_assert(&trobj, ret == 0);
+               traceobj_check(&trobj, ret, 0);
        }
 
        traceobj_exit(&trobj);
@@ -51,10 +51,10 @@ static void push_task(void *arg)
                ret = rt_queue_read(&queue1, &p, sizeof(p), TM_INFINITE);
                traceobj_assert(&trobj, ret == sizeof(p));
                ret = rt_heap_free(&heap1, p);
-               traceobj_assert(&trobj, ret == 0);
+               traceobj_check(&trobj, ret, 0);
        
                ret = rt_heap_alloc(&heap2, MSGSIZE, TM_INFINITE, &p);
-               traceobj_assert(&trobj, ret == 0);
+               traceobj_check(&trobj, ret, 0);
                ret = rt_queue_write(&queue2, &p, sizeof(p), Q_NORMAL);
                traceobj_assert(&trobj, ret >= 0);
        }
@@ -69,28 +69,28 @@ int main(int argc, char *const argv[])
        traceobj_init(&trobj, argv[0], 0);
 
        ret = rt_heap_create(&heap1, "HEAP1", HEAPSIZE, H_FIFO);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_heap_create(&heap2, "HEAP2", HEAPSIZE, H_FIFO);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_queue_create(&queue1, "QUEUE1", POOLSIZE, NMESSAGES, Q_FIFO);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_queue_create(&queue2, "QUEUE2", POOLSIZE, NMESSAGES, Q_FIFO);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_create(&t_pull, "PULL", 0,  20, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_create(&t_push, "PUSH", 0,  20, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_start(&t_pull, pull_task, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_start(&t_push, push_task, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_join(&trobj);
 
diff --git a/lib/alchemy/testsuite/mq-1.c b/lib/alchemy/testsuite/mq-1.c
index ae021d8..ac9801e 100644
--- a/lib/alchemy/testsuite/mq-1.c
+++ b/lib/alchemy/testsuite/mq-1.c
@@ -30,36 +30,36 @@ static void main_task(void *arg)
        traceobj_enter(&trobj);
 
        ret = rt_queue_create(&q, "QUEUE", sizeof(messages), Q_UNLIMITED, 
0xffffffff);
-       traceobj_assert(&trobj, ret == -EINVAL);
+       traceobj_check(&trobj, ret, -EINVAL);
 
        ret = rt_queue_create(&q, "QUEUE", 0, NMESSAGES, Q_FIFO);
-       traceobj_assert(&trobj, ret == -EINVAL);
+       traceobj_check(&trobj, ret, -EINVAL);
 
        ret = rt_queue_create(&q, "QUEUE", sizeof(messages), Q_UNLIMITED, 
Q_FIFO);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_queue_delete(&q);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_queue_create(&q, "QUEUE", sizeof(messages), NMESSAGES, Q_PRIO);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_queue_inquire(&q, &info);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
        traceobj_assert(&trobj, info.nmessages == 0);
 
        ret = rt_queue_write(&q, &messages[0], sizeof(int), Q_NORMAL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_queue_inquire(&q, &info);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
        traceobj_assert(&trobj, info.nmessages == 1);
 
        ret = rt_queue_write(&q, &messages[1], sizeof(int), Q_NORMAL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_queue_inquire(&q, &info);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
        traceobj_assert(&trobj, info.nmessages == 2);
 
        ret = rt_queue_read(&q, &msg, sizeof(msg), TM_NONBLOCK);
@@ -67,7 +67,7 @@ static void main_task(void *arg)
        traceobj_assert(&trobj, msg == 0xfafafafa);
 
        ret = rt_queue_inquire(&q, &info);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
        traceobj_assert(&trobj, info.nmessages == 1);
 
        ret = rt_queue_read(&q, &msg, sizeof(msg), TM_NONBLOCK);
@@ -75,14 +75,14 @@ static void main_task(void *arg)
        traceobj_assert(&trobj, msg == 0xbebebebe);
 
        ret = rt_queue_inquire(&q, &info);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
        traceobj_assert(&trobj, info.nmessages == 0);
 
        ret = rt_queue_read(&q, &msg, sizeof(msg), 1000000ULL);
-       traceobj_assert(&trobj, ret == -ETIMEDOUT);
+       traceobj_check(&trobj, ret, -ETIMEDOUT);
 
        ret = rt_queue_delete(&q);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_exit(&trobj);
 }
@@ -95,7 +95,7 @@ int main(int argc, char *const argv[])
        traceobj_init(&trobj, argv[0], 0);
 
        ret = rt_task_spawn(&t_main, "main_task", 0,  50, 0, main_task, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_join(&trobj);
 
diff --git a/lib/alchemy/testsuite/mq-2.c b/lib/alchemy/testsuite/mq-2.c
index 2c238d6..3a631e4 100644
--- a/lib/alchemy/testsuite/mq-2.c
+++ b/lib/alchemy/testsuite/mq-2.c
@@ -57,17 +57,17 @@ static void main_task(void *arg)
        traceobj_enter(&trobj);
 
        ret = rt_queue_create(&q, "QUEUE", sizeof(messages), NMESSAGES, Q_PRIO);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 3);
 
        ret = rt_task_set_priority(NULL, 11);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 4);
 
        ret = rt_task_spawn(&t_peer, "peer_task", 0,  10, 0, peer_task, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 5);
 
@@ -85,7 +85,7 @@ static void main_task(void *arg)
        traceobj_mark(&trobj, 7);
 
        ret = rt_queue_inquire(&q, &info);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
        traceobj_assert(&trobj, info.nmessages == 0);
 
        traceobj_verify(&trobj, tseq, sizeof(tseq) / sizeof(int));
@@ -101,7 +101,7 @@ int main(int argc, char *const argv[])
        traceobj_init(&trobj, argv[0], sizeof(tseq) / sizeof(int));
 
        ret = rt_task_spawn(&t_main, "main_task", 0,  50, 0, main_task, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_join(&trobj);
 
diff --git a/lib/alchemy/testsuite/mq-3.c b/lib/alchemy/testsuite/mq-3.c
index dc1ec96..7fcae02 100644
--- a/lib/alchemy/testsuite/mq-3.c
+++ b/lib/alchemy/testsuite/mq-3.c
@@ -24,24 +24,24 @@ static void main_task(void *arg)
        traceobj_mark(&trobj, 1);
 
        ret = rt_queue_create(&q, "QUEUE", NMESSAGES * sizeof(int), NMESSAGES, 
Q_FIFO);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 2);
 
        for (msg = 0; msg < NMESSAGES; msg++) {
                ret = rt_queue_write(&q, &msg, sizeof(int), Q_NORMAL);
-               traceobj_assert(&trobj, ret == 0);
+               traceobj_check(&trobj, ret, 0);
        }
 
        traceobj_mark(&trobj, 3);
 
        ret = rt_queue_write(&q, &msg, sizeof(int), Q_URGENT);
-       traceobj_assert(&trobj, ret == -ENOMEM);
+       traceobj_check(&trobj, ret, -ENOMEM);
 
        rt_task_sleep(100000000ULL);
 
        ret = rt_queue_write(&q, &msg, sizeof(int), Q_URGENT);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 4);
 
@@ -58,7 +58,7 @@ static void main_task(void *arg)
        traceobj_mark(&trobj, 6);
 
        ret = rt_queue_delete(&q);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 7);
 
@@ -84,7 +84,7 @@ static void peer_task(void *arg)
 
        /* Valgrind will bark at this one, this is expected. */
        ret = rt_queue_read(&q, &msg, sizeof(msg), TM_INFINITE);
-       traceobj_assert(&trobj, ret == -EINVAL);
+       traceobj_check(&trobj, ret, -EINVAL);
 
        traceobj_mark(&trobj, 10);
 
@@ -101,12 +101,12 @@ int main(int argc, char *const argv[])
        traceobj_mark(&trobj, 11);
 
        ret = rt_task_spawn(&t_main, "main_task", 0,  50, 0, main_task, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 12);
 
        ret = rt_task_spawn(&t_peer, "peer_task", 0,  49, 0, peer_task, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 13);
 
diff --git a/lib/alchemy/testsuite/mutex-1.c b/lib/alchemy/testsuite/mutex-1.c
index 8143712..ef58a2c 100644
--- a/lib/alchemy/testsuite/mutex-1.c
+++ b/lib/alchemy/testsuite/mutex-1.c
@@ -30,22 +30,22 @@ static void task_a(void *arg)
        traceobj_mark(&trobj, 2);
 
        ret = rt_mutex_acquire(&mutex, TM_NONBLOCK);
-       traceobj_assert(&trobj, ret == -EWOULDBLOCK);
+       traceobj_check(&trobj, ret, -EWOULDBLOCK);
 
        traceobj_mark(&trobj, 3);
 
        ret = rt_mutex_acquire(&mutex, 100000000ULL);
-       traceobj_assert(&trobj, ret == -ETIMEDOUT);
+       traceobj_check(&trobj, ret, -ETIMEDOUT);
 
        traceobj_mark(&trobj, 4);
 
        ret = rt_task_resume(&t);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 5);
 
        ret = rt_mutex_acquire(&mutex, TM_INFINITE);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 6);
 
@@ -61,57 +61,57 @@ static void task_b(void *arg)
        traceobj_mark(&trobj, 6);
 
        ret = rt_task_set_priority(NULL, 19);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 7);
 
        ret = rt_mutex_create(&mutex, "MUTEX");
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 8);
 
        ret = rt_mutex_create(&mutex, "MUTEX");
-       traceobj_assert(&trobj, ret == -EEXIST);
+       traceobj_check(&trobj, ret, -EEXIST);
 
        traceobj_mark(&trobj, 9);
 
        ret = rt_mutex_acquire(&mutex, TM_INFINITE);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 10);
 
        ret = rt_mutex_acquire(&mutex, TM_INFINITE);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 11);
 
        ret = rt_mutex_release(&mutex);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 12);
 
        ret = rt_mutex_release(&mutex);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 13);
 
        ret = rt_mutex_release(&mutex);
-       traceobj_assert(&trobj, ret == -EPERM);
+       traceobj_check(&trobj, ret, -EPERM);
 
        traceobj_mark(&trobj, 14);
 
        ret = rt_mutex_acquire(&mutex, TM_INFINITE);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 15);
 
        ret = rt_task_suspend(rt_task_self());
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 16);
 
        ret = rt_mutex_release(&mutex);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 17);
 
@@ -125,18 +125,18 @@ int main(int argc, char *const argv[])
        traceobj_init(&trobj, argv[0], sizeof(tseq) / sizeof(int));
 
        ret = rt_task_create(&t_b, "taskB", 0, 21, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_start(&t_b, task_b, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 18);
 
        ret = rt_task_create(&t_a, "taskA", 0, 20, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_start(&t_a, task_a, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 19);
 
diff --git a/lib/alchemy/testsuite/pipe-1.c b/lib/alchemy/testsuite/pipe-1.c
index 99cf1fa..1fa028a 100644
--- a/lib/alchemy/testsuite/pipe-1.c
+++ b/lib/alchemy/testsuite/pipe-1.c
@@ -27,7 +27,7 @@ static void realtime_task(void *arg)
        traceobj_enter(&trobj);
 
        ret = rt_pipe_bind(&pipe, "pipe", TM_INFINITE);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        while (seq < 8192) {
                ret = rt_pipe_read(&pipe, &m, sizeof(m), TM_INFINITE);
@@ -81,23 +81,23 @@ int main(int argc, char *const argv[])
        traceobj_assert(&trobj, ret >= 0);
 
        ret = rt_pipe_delete(&pipe);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_create(&t_real, "realtime", 0,  10, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_start(&t_real, realtime_task, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_pipe_create(&pipe, "pipe", P_MINOR_AUTO, 16384);
        traceobj_assert(&trobj, ret >= 0);
        minor = ret;
 
        ret = rt_pipe_read(&pipe, &m, sizeof(m), TM_NONBLOCK);
-       traceobj_assert(&trobj, ret == -EWOULDBLOCK);
+       traceobj_check(&trobj, ret, -EWOULDBLOCK);
 
        ret = pthread_create(&t_reg, NULL, regular_thread, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_join(&trobj);
 
diff --git a/lib/alchemy/testsuite/sem-1.c b/lib/alchemy/testsuite/sem-1.c
index ac32404..3e526ed 100644
--- a/lib/alchemy/testsuite/sem-1.c
+++ b/lib/alchemy/testsuite/sem-1.c
@@ -27,17 +27,17 @@ static void task_a(void *arg)
        traceobj_mark(&trobj, 1);
 
        ret = rt_sem_v(&sem);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 2);
 
        ret = rt_sem_p(&sem, TM_INFINITE);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 3);
 
        ret = rt_task_set_mode(T_LOCK, T_LOCK, &oldmode);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 4);
 
@@ -47,27 +47,27 @@ static void task_a(void *arg)
        traceobj_mark(&trobj, 5);
 
        ret = rt_task_resume(&t);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 6);
 
        ret = rt_sem_v(&sem);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 7);
 
        ret = rt_sem_v(&sem);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 8);
 
        ret = rt_task_set_mode(T_LOCK, 0, &oldmode);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 9);
 
        ret = rt_task_suspend(NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_exit(&trobj);
 }
@@ -82,12 +82,12 @@ static void task_b(void *arg)
        traceobj_mark(&trobj, 10);
 
        ret = rt_sem_create(&sem, "SEMA", 0, S_FIFO);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 13);
 
        ret = rt_sem_p(&sem, TM_INFINITE);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_bind(&t, "taskA", TM_INFINITE);
        traceobj_assert(&trobj, ret == 0 && rt_task_same(&t, &t_a));
@@ -95,32 +95,32 @@ static void task_b(void *arg)
        traceobj_mark(&trobj, 14);
 
        ret = rt_sem_v(&sem);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 15);
 
        ret = rt_task_suspend(NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 16);
 
        ret = rt_sem_p(&sem, 10000000ULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 17);
 
        ret = rt_sem_p(&sem, TM_NONBLOCK);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 18);
 
        ret = rt_sem_p(&sem, 100000000ULL);
-       traceobj_assert(&trobj, ret == -ETIMEDOUT);
+       traceobj_check(&trobj, ret, -ETIMEDOUT);
 
        traceobj_mark(&trobj, 19);
 
        ret = rt_task_resume(&t);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_exit(&trobj);
 }
@@ -132,16 +132,16 @@ int main(int argc, char *const argv[])
        traceobj_init(&trobj, argv[0], sizeof(tseq) / sizeof(int));
 
        ret = rt_task_create(&t_a, "taskA", 0, 20, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_create(&t_b, "taskB", 0, 21, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_start(&t_b, task_b, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_start(&t_a, task_a, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_join(&trobj);
 
diff --git a/lib/alchemy/testsuite/sem-2.c b/lib/alchemy/testsuite/sem-2.c
index 0a06795..c01f6a4 100644
--- a/lib/alchemy/testsuite/sem-2.c
+++ b/lib/alchemy/testsuite/sem-2.c
@@ -22,17 +22,17 @@ static void main_task(void *arg)
        traceobj_mark(&trobj, 1);
 
        ret = rt_sem_create(&sem, "SEMA", 1, S_FIFO);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 2);
 
        ret = rt_sem_p(&sem, TM_NONBLOCK);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 3);
 
        ret = rt_sem_p(&sem, TM_INFINITE);
-       traceobj_assert(&trobj, ret == -EIDRM);
+       traceobj_check(&trobj, ret, -EIDRM);
 
        traceobj_mark(&trobj, 4);
 
@@ -46,15 +46,15 @@ int main(int argc, char *const argv[])
        traceobj_init(&trobj, argv[0], sizeof(tseq) / sizeof(int));
 
        ret = rt_task_create(&t_main, "main_task", 0, 20, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_start(&t_main, main_task, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 5);
 
        ret = rt_sem_delete(&sem);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 6);
 
diff --git a/lib/alchemy/testsuite/task-1.c b/lib/alchemy/testsuite/task-1.c
index d11683a..34a6c22 100644
--- a/lib/alchemy/testsuite/task-1.c
+++ b/lib/alchemy/testsuite/task-1.c
@@ -21,10 +21,10 @@ int main(int argc, char *const argv[])
        traceobj_init(&trobj, argv[0], 0);
 
        ret = rt_task_create(&t_main, "main_task", 0, 99, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_start(&t_main, main_task, (void *)(long)0xdeadbeef);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_join(&trobj);
 
diff --git a/lib/alchemy/testsuite/task-10.c b/lib/alchemy/testsuite/task-10.c
index 3b16ff3..58f4cb0 100644
--- a/lib/alchemy/testsuite/task-10.c
+++ b/lib/alchemy/testsuite/task-10.c
@@ -23,7 +23,7 @@ static void test_task(void *arg)
        traceobj_mark(&trobj, 6);
 
        ret = rt_sem_p(&sem, TM_INFINITE);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 7);
 
@@ -37,30 +37,30 @@ int main(int argc, char *const argv[])
        traceobj_init(&trobj, argv[0], sizeof(tseq) / sizeof(int));
 
        ret = rt_sem_create(&sem, "SEMA", 0, S_FIFO);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_create(&t_test, "test_task", 0, 10, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 1);
 
        ret = rt_task_start(&t_test, test_task, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 2);
 
        ret = rt_task_suspend(&t_test);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 3);
 
        ret = rt_sem_v(&sem);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 4);
 
        ret = rt_task_resume(&t_test);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 5);
 
diff --git a/lib/alchemy/testsuite/task-2.c b/lib/alchemy/testsuite/task-2.c
index 7376dab..fd01f64 100644
--- a/lib/alchemy/testsuite/task-2.c
+++ b/lib/alchemy/testsuite/task-2.c
@@ -24,7 +24,7 @@ static void background_task(void *arg)
        traceobj_mark(&trobj, 1);
 
        ret = rt_sem_p(&sem, TM_INFINITE);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 2);
 
@@ -45,7 +45,7 @@ static void foreground_task(void *arg)
        traceobj_mark(&trobj, 4);
 
        ret = rt_sem_p(&sem, TM_INFINITE);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 5);
 
@@ -54,7 +54,7 @@ static void foreground_task(void *arg)
        traceobj_mark(&trobj, 6);
 
        ret = rt_task_delete(&t_bgnd);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 7);
 
@@ -68,33 +68,33 @@ int main(int argc, char *const argv[])
        traceobj_init(&trobj, argv[0], sizeof(tseq) / sizeof(int));
 
        ret = rt_sem_create(&sem, "SEMA", 0, S_PRIO);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 8);
 
        ret = rt_task_create(&t_bgnd, "BGND", 0,  20, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_start(&t_bgnd, background_task, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 9);
 
        ret = rt_task_create(&t_fgnd, "FGND", 0,  21, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_start(&t_fgnd, foreground_task, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 10);
 
        ret = rt_sem_v(&sem);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 11);
 
        ret = rt_sem_v(&sem);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_join(&trobj);
 
diff --git a/lib/alchemy/testsuite/task-3.c b/lib/alchemy/testsuite/task-3.c
index 9df4525..06f235a 100644
--- a/lib/alchemy/testsuite/task-3.c
+++ b/lib/alchemy/testsuite/task-3.c
@@ -15,34 +15,34 @@ int main(int argc, char *const argv[])
        traceobj_init(&trobj, argv[0], 0);
 
        ret = rt_task_create(&t_a, "taskA", 0,  20, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_create(&t_b, "taskB", 0,  21, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_bind(&t, "taskA", TM_NONBLOCK);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
        traceobj_assert(&trobj, rt_task_same(&t, &t_a));
 
        ret = rt_task_bind(&t, "taskB", TM_NONBLOCK);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
        traceobj_assert(&trobj, rt_task_same(&t, &t_b));
 
        ret = rt_task_delete(&t_a);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
        ret = rt_task_bind(&t, "taskA", TM_NONBLOCK);
-       traceobj_assert(&trobj, ret == -EWOULDBLOCK);
+       traceobj_check(&trobj, ret, -EWOULDBLOCK);
 
        ret = rt_task_delete(&t_b);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
        ret = rt_task_bind(&t, "taskB", TM_NONBLOCK);
-       traceobj_assert(&trobj, ret == -EWOULDBLOCK);
+       traceobj_check(&trobj, ret, -EWOULDBLOCK);
 
        ret = rt_task_shadow(NULL, "main_task", 1, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_bind(&t, "taskB", 1000000000ULL);
-       traceobj_assert(&trobj, ret == -ETIMEDOUT);
+       traceobj_check(&trobj, ret, -ETIMEDOUT);
 
        exit(0);
 }
diff --git a/lib/alchemy/testsuite/task-4.c b/lib/alchemy/testsuite/task-4.c
index 42d668b..eba7fbb 100644
--- a/lib/alchemy/testsuite/task-4.c
+++ b/lib/alchemy/testsuite/task-4.c
@@ -23,19 +23,19 @@ static void background_task(void *arg)
        traceobj_mark(&trobj, 1);
 
        ret = rt_sem_p(&sem, TM_INFINITE);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 2);
 
        ret = rt_task_suspend(&t_fgnd);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        rt_task_sleep(20000000ULL);
 
        traceobj_mark(&trobj, 3);
 
        ret = rt_task_resume(&t_fgnd);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 13);
 
@@ -51,7 +51,7 @@ static void foreground_task(void *arg)
        traceobj_mark(&trobj, 4);
 
        ret = rt_sem_p(&sem, TM_INFINITE);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 5);
 
@@ -65,33 +65,33 @@ int main(int argc, char *const argv[])
        traceobj_init(&trobj, argv[0], sizeof(tseq) / sizeof(int));
 
        ret = rt_sem_create(&sem, "SEMA", 0, S_FIFO);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 8);
 
        ret = rt_task_create(&t_bgnd, "BGND", 0,  20, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_start(&t_bgnd, background_task, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 9);
 
        ret = rt_task_create(&t_fgnd, "FGND", 0,  21, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_start(&t_fgnd, foreground_task, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 10);
 
        ret = rt_sem_v(&sem);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 11);
 
        ret = rt_sem_v(&sem);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 12);
 
diff --git a/lib/alchemy/testsuite/task-5.c b/lib/alchemy/testsuite/task-5.c
index eaf0af2..3c0fa42 100644
--- a/lib/alchemy/testsuite/task-5.c
+++ b/lib/alchemy/testsuite/task-5.c
@@ -23,7 +23,7 @@ static void background_task(void *arg)
        traceobj_mark(&trobj, 1);
 
        ret = rt_sem_p(&sem, TM_INFINITE);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 2);
 
@@ -40,12 +40,12 @@ static void foreground_task(void *arg)
        traceobj_mark(&trobj, 3);
 
        ret = rt_sem_p(&sem, TM_INFINITE);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 4);
 
        ret = rt_sem_v(&sem);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 5);
 
@@ -55,12 +55,12 @@ static void foreground_task(void *arg)
        traceobj_mark(&trobj, 6);
 
        ret = rt_task_set_priority(&t_bgnd, info.prio);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 7);
 
        ret = rt_task_set_priority(&t_bgnd, info.prio + 1);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 8);
 
@@ -74,28 +74,28 @@ int main(int argc, char *const argv[])
        traceobj_init(&trobj, argv[0], sizeof(tseq) / sizeof(int));
 
        ret = rt_sem_create(&sem, "SEMA", 0, S_PRIO);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 9);
 
        ret = rt_task_create(&t_bgnd, "BGND", 0,  20, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_start(&t_bgnd, background_task, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 10);
 
        ret = rt_task_create(&t_fgnd, "FGND", 0,  21, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_start(&t_fgnd, foreground_task, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 11);
 
        ret = rt_sem_v(&sem);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_mark(&trobj, 12);
 
diff --git a/lib/alchemy/testsuite/task-6.c b/lib/alchemy/testsuite/task-6.c
index 5b9a7f0..7c88fde 100644
--- a/lib/alchemy/testsuite/task-6.c
+++ b/lib/alchemy/testsuite/task-6.c
@@ -24,7 +24,7 @@ static void background_task(void *arg)
                traceobj_assert(&trobj, msg == n);
                msg = ~msg;
                ret = rt_task_reply(flowid, &mcb);
-               traceobj_assert(&trobj, ret == 0);
+               traceobj_check(&trobj, ret, 0);
        }
 
        traceobj_exit(&trobj);
@@ -60,16 +60,16 @@ int main(int argc, char *const argv[])
        traceobj_init(&trobj, argv[0], 0);
 
        ret = rt_task_create(&t_bgnd, "BGND", 0,  20, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_start(&t_bgnd, background_task, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_create(&t_fgnd, "FGND", 0,  21, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_start(&t_fgnd, foreground_task, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_join(&trobj);
 
diff --git a/lib/alchemy/testsuite/task-7.c b/lib/alchemy/testsuite/task-7.c
index 33416a2..1350bb3 100644
--- a/lib/alchemy/testsuite/task-7.c
+++ b/lib/alchemy/testsuite/task-7.c
@@ -15,10 +15,10 @@ static void background_task(void *arg)
        traceobj_enter(&trobj);
 
        ret = rt_task_reply(-1, &mcb);
-       traceobj_assert(&trobj, ret == -EINVAL);
+       traceobj_check(&trobj, ret, -EINVAL);
 
        ret = rt_task_reply(999, &mcb);
-       traceobj_assert(&trobj, ret == -ENXIO);
+       traceobj_check(&trobj, ret, -ENXIO);
 
        for (n = 0; n < 20; n++) {
                mcb.data = &msg;
@@ -30,7 +30,7 @@ static void background_task(void *arg)
                case 0x77:
                        msg = ~msg;
                        ret = rt_task_reply(flowid, &mcb);
-                       traceobj_assert(&trobj, ret == 0);
+                       traceobj_check(&trobj, ret, 0);
                        break;
                case 0x78:
                        ret = rt_task_reply(flowid, &mcb);
@@ -80,7 +80,7 @@ static void foreground_task_b(void *arg)
                mcb_r.data = NULL;
                mcb_r.size = 0;
                ret = rt_task_send(&t_bgnd, &mcb, &mcb_r, TM_INFINITE);
-               traceobj_assert(&trobj, ret == -ENOBUFS);
+               traceobj_check(&trobj, ret, -ENOBUFS);
        }
 
        traceobj_exit(&trobj);
@@ -93,22 +93,22 @@ int main(int argc, char *const argv[])
        traceobj_init(&trobj, argv[0], 0);
 
        ret = rt_task_create(&t_bgnd, "BGND", 0,  20, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_create(&t_fgnda, "FGND-A", 0,  21, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_start(&t_fgnda, foreground_task_a, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_create(&t_fgndb, "FGND-B", 0,  21, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_start(&t_fgndb, foreground_task_b, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_start(&t_bgnd, background_task, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_join(&trobj);
 
diff --git a/lib/alchemy/testsuite/task-8.c b/lib/alchemy/testsuite/task-8.c
index ad6accf..bb6dfff 100644
--- a/lib/alchemy/testsuite/task-8.c
+++ b/lib/alchemy/testsuite/task-8.c
@@ -23,10 +23,10 @@ static void rr_task(void *arg)
        traceobj_enter(&trobj);
 
        ret = rt_task_slice(NULL, RR_QUANTUM);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_sem_p(&sem, TM_INFINITE);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        for (n = 0; n < 1000000; n++) {
                d *= 0.99;
@@ -43,22 +43,22 @@ int main(int argc, char *const argv[])
        traceobj_init(&trobj, argv[0], 0);
 
        ret = rt_sem_create(&sem, "SEMA", 0, S_FIFO);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_create(&t_rr1, "rr_task_1", 0, 10, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_start(&t_rr1, rr_task, "t1");
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_create(&t_rr2, "rr_task_2", 0, 10, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_start(&t_rr2, rr_task, "t2");
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_sem_broadcast(&sem);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_join(&trobj);
 
diff --git a/lib/alchemy/testsuite/task-9.c b/lib/alchemy/testsuite/task-9.c
index 168afbb..e358154 100644
--- a/lib/alchemy/testsuite/task-9.c
+++ b/lib/alchemy/testsuite/task-9.c
@@ -22,7 +22,7 @@ static void test_task(void *arg)
        traceobj_enter(&trobj);
 
        ret = rt_task_sleep_until(TM_INFINITE);
-       traceobj_assert(&trobj, ret == -EINTR);
+       traceobj_check(&trobj, ret, -EINTR);
 
        traceobj_exit(&trobj);
 }
@@ -41,28 +41,28 @@ int main(int argc, char *const argv[])
        traceobj_init(&trobj, argv[0], 0);
 
        ret = rt_task_create(&t_test, "test_task", 0, 10, 0);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_inquire(&t_test, &info);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        sigemptyset(&set);
        sigaddset(&set, SIGUSR1);
        pthread_sigmask(SIG_BLOCK, &set, NULL);
 
        ret = rt_task_start(&t_test, test_task, NULL);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_sleep(ONE_SECOND);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = __STD(kill(info.pid, SIGUSR1));
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        ret = rt_task_sleep(ONE_SECOND);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
        ret = rt_task_unblock(&t_test);
-       traceobj_assert(&trobj, ret == 0);
+       traceobj_check(&trobj, ret, 0);
 
        traceobj_join(&trobj);
 


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://xenomai.org/mailman/listinfo/xenomai-git

Reply via email to