Module: xenomai-3 Branch: master Commit: a40320e84bfd9597be3be62dfc3c808d6315026c URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=a40320e84bfd9597be3be62dfc3c808d6315026c
Author: Philippe Gerum <r...@xenomai.org> Date: Sat Jun 20 15:13:01 2015 +0200 testsuite/smokey: convert notes to traces when appropriate smokey --verbose=2 or higher turns on traces. --- testsuite/smokey/bufp/bufp.c | 6 +++--- testsuite/smokey/iddp/iddp.c | 6 +++--- testsuite/smokey/posix-clock/posix-clock.c | 12 ++++++------ testsuite/smokey/posix-select/posix-select.c | 2 +- testsuite/smokey/sigdebug/sigdebug.c | 14 +++++++------- testsuite/smokey/timerfd/timerfd.c | 12 ++++++------ testsuite/smokey/xddp/xddp.c | 8 ++++---- 7 files changed, 30 insertions(+), 30 deletions(-) diff --git a/testsuite/smokey/bufp/bufp.c b/testsuite/smokey/bufp/bufp.c index 14ff033..638cde9 100644 --- a/testsuite/smokey/bufp/bufp.c +++ b/testsuite/smokey/bufp/bufp.c @@ -83,8 +83,8 @@ static void *server(void *arg) errno = -EINVAL; fail("recvfrom"); } - smokey_note("%s: received %d bytes, %ld from port %d", - __FUNCTION__, ret, data, claddr.sipc_port); + smokey_trace("%s: received %d bytes, %ld from port %d", + __FUNCTION__, ret, data, claddr.sipc_port); } return NULL; @@ -123,7 +123,7 @@ static void *client(void *arg) close(s); fail("sendto"); } - smokey_note("%s: sent %d bytes, %ld", __FUNCTION__, ret, data); + smokey_trace("%s: sent %d bytes, %ld", __FUNCTION__, ret, data); ts.tv_sec = 0; ts.tv_nsec = 100000000; /* 100 ms */ clock_nanosleep(CLOCK_REALTIME, 0, &ts, NULL); diff --git a/testsuite/smokey/iddp/iddp.c b/testsuite/smokey/iddp/iddp.c index dc65f2e..ccc4ea4 100644 --- a/testsuite/smokey/iddp/iddp.c +++ b/testsuite/smokey/iddp/iddp.c @@ -83,8 +83,8 @@ static void *server(void *arg) errno = -EINVAL; fail("recvfrom"); } - smokey_note("%s: received %d bytes, %ld from port %d", - __FUNCTION__, ret, data, claddr.sipc_port); + smokey_trace("%s: received %d bytes, %ld from port %d", + __FUNCTION__, ret, data, claddr.sipc_port); } return NULL; @@ -127,7 +127,7 @@ static void *client(void *arg) close(s); fail("sendto"); } - smokey_note("%s: sent %d bytes, %ld", __FUNCTION__, ret, data); + smokey_trace("%s: sent %d bytes, %ld", __FUNCTION__, ret, data); ts.tv_sec = 0; ts.tv_nsec = 100000000; /* 100 ms */ clock_nanosleep(CLOCK_REALTIME, 0, &ts, NULL); diff --git a/testsuite/smokey/posix-clock/posix-clock.c b/testsuite/smokey/posix-clock/posix-clock.c index 9781565..f672a9d 100644 --- a/testsuite/smokey/posix-clock/posix-clock.c +++ b/testsuite/smokey/posix-clock/posix-clock.c @@ -42,7 +42,7 @@ static int clock_increase_before_oneshot_timer_first_tick(void) struct timespec now; int t, ret; - smokey_note(__func__); + smokey_trace(__func__); t = smokey_check_errno(timerfd_create(CLOCK_REALTIME, 0)); if (t < 0) @@ -99,7 +99,7 @@ static int clock_increase_before_periodic_timer_first_tick(void) struct timespec now; int t, ret; - smokey_note(__func__); + smokey_trace(__func__); t = smokey_check_errno(timerfd_create(CLOCK_REALTIME, 0)); if (t < 0) @@ -161,7 +161,7 @@ static int clock_increase_after_periodic_timer_first_tick(void) struct timespec now; int t, ret; - smokey_note(__func__); + smokey_trace(__func__); t = smokey_check_errno(timerfd_create(CLOCK_REALTIME, 0)); if (t < 0) @@ -237,7 +237,7 @@ static int clock_decrease_before_oneshot_timer_first_tick(void) long long diff; int t, ret; - smokey_note(__func__); + smokey_trace(__func__); t = smokey_check_errno(timerfd_create(CLOCK_REALTIME, 0)); if (t < 0) @@ -296,7 +296,7 @@ static int clock_decrease_before_periodic_timer_first_tick(void) long long diff; int t, ret; - smokey_note(__func__); + smokey_trace(__func__); t = smokey_check_errno(timerfd_create(CLOCK_REALTIME, 0)); if (t < 0) @@ -362,7 +362,7 @@ static int clock_decrease_after_periodic_timer_first_tick(void) long long diff; int t, ret; - smokey_note(__func__); + smokey_trace(__func__); t = smokey_check_errno(timerfd_create(CLOCK_REALTIME, 0)); if (t < 0) diff --git a/testsuite/smokey/posix-select/posix-select.c b/testsuite/smokey/posix-select/posix-select.c index 18a2b6b..6f5c314 100644 --- a/testsuite/smokey/posix-select/posix-select.c +++ b/testsuite/smokey/posix-select/posix-select.c @@ -91,7 +91,7 @@ static void *mq_thread(void *cookie) break; } - smokey_note("received %s", buf); + smokey_trace("received %s", buf); i = (i + 1) % (sizeof(tunes) / sizeof(tunes[0])); } diff --git a/testsuite/smokey/sigdebug/sigdebug.c b/testsuite/smokey/sigdebug/sigdebug.c index ccaef7c..0e7efc5 100644 --- a/testsuite/smokey/sigdebug/sigdebug.c +++ b/testsuite/smokey/sigdebug/sigdebug.c @@ -96,12 +96,12 @@ static void *rt_thread_body(void *cookie) err = pthread_setmode_np(0, PTHREAD_WARNSW, NULL); check_no_error("pthread_setmode_np", err); - smokey_note("syscall"); + smokey_trace("syscall"); setup_checkdebug(SIGDEBUG_MIGRATE_SYSCALL); syscall(__NR_gettid); check_sigdebug_received("SIGDEBUG_MIGRATE_SYSCALL"); - smokey_note("signal"); + smokey_trace("signal"); setup_checkdebug(SIGDEBUG_MIGRATE_SIGNAL); err = sem_post(&send_signal); check_no_error("sem_post", err); @@ -109,13 +109,13 @@ static void *rt_thread_body(void *cookie) check_no_error("clock_nanosleep", err); check_sigdebug_received("SIGDEBUG_MIGRATE_SIGNAL"); - smokey_note("relaxed mutex owner"); + smokey_trace("relaxed mutex owner"); setup_checkdebug(SIGDEBUG_MIGRATE_PRIOINV); err = pthread_mutex_lock(&prio_invert); check_no_error("pthread_mutex_lock", err); check_sigdebug_received("SIGDEBUG_MIGRATE_PRIOINV"); - smokey_note("page fault"); + smokey_trace("page fault"); setup_checkdebug(SIGDEBUG_MIGRATE_FAULT); delay.tv_nsec = 0; err = clock_nanosleep(CLOCK_MONOTONIC, 0, &delay, NULL); @@ -124,7 +124,7 @@ static void *rt_thread_body(void *cookie) check_sigdebug_received("SIGDEBUG_MIGRATE_FAULT"); if (wd) { - smokey_note("watchdog"); + smokey_trace("watchdog"); rt_print_flush_buffers(); setup_checkdebug(SIGDEBUG_WATCHDOG); clock_gettime(CLOCK_MONOTONIC, &now); @@ -139,7 +139,7 @@ static void *rt_thread_body(void *cookie) } else smokey_note("watchdog not tested"); - smokey_note("lock break"); + smokey_trace("lock break"); setup_checkdebug(SIGDEBUG_LOCK_BREAK); err = pthread_setmode_np(0, PTHREAD_LOCK_SCHED | PTHREAD_DISABLE_LOCKBREAK, NULL); @@ -251,7 +251,7 @@ static int run_sigdebug(struct smokey_test *t, int argc, char *const argv[]) err = pthread_attr_setschedparam(&attr, ¶ms); check_no_error("pthread_attr_setschedparam", err); - smokey_note("mlockall"); + smokey_trace("mlockall"); munlockall(); setup_checkdebug(SIGDEBUG_NOMLOCK); err = pthread_create(&rt_thread, &attr, rt_thread_body, NULL); diff --git a/testsuite/smokey/timerfd/timerfd.c b/testsuite/smokey/timerfd/timerfd.c index be9910a..1d58133 100644 --- a/testsuite/smokey/timerfd/timerfd.c +++ b/testsuite/smokey/timerfd/timerfd.c @@ -62,7 +62,7 @@ static int timerfd_basic_check(void) return ret; if (!smokey_assert(ret == 8)) return -EINVAL; - smokey_note("%Ld direct read ticks", ticks); + smokey_trace("%Ld direct read ticks", ticks); if (!smokey_assert(ticks >= 1)) return -EINVAL; } @@ -106,7 +106,7 @@ static int timerfd_select_check(void) if (ret < 0) return ret; smokey_assert(ret == 8); - smokey_note("%Ld select+read ticks", ticks); + smokey_trace("%Ld select+read ticks", ticks); if (!smokey_assert(ticks >= 1)) return -EINVAL; } @@ -139,7 +139,7 @@ static int timerfd_basic_overruns_check(void) if (ret < 0) return ret; smokey_assert(ret == 8); - smokey_note("%Ld direct read ticks", ticks); + smokey_trace("%Ld direct read ticks", ticks); if (!smokey_assert(ticks >= 10)) return -EINVAL; } @@ -184,7 +184,7 @@ static int timerfd_select_overruns_check(void) if (ret < 0) return ret; smokey_assert(ret == 8); - smokey_note("%Ld select+read ticks", ticks); + smokey_trace("%Ld select+read ticks", ticks); if (!smokey_assert(ticks >= 10)) return -EINVAL; } @@ -229,7 +229,7 @@ static int timerfd_select_overruns2_check(void) if (ret < 0) return ret; smokey_assert(ret == 8); - smokey_note("%Ld select+read ticks", ticks); + smokey_trace("%Ld select+read ticks", ticks); if (!smokey_assert(ticks >= 11)) return -EINVAL; } @@ -275,7 +275,7 @@ static int timerfd_select_overruns_before_check(void) if (ret < 0) return ret; smokey_assert(ret == 8); - smokey_note("%Ld select+read ticks", ticks); + smokey_trace("%Ld select+read ticks", ticks); if (!smokey_assert(ticks >= 10)) return -EINVAL; sleep(1); diff --git a/testsuite/smokey/xddp/xddp.c b/testsuite/smokey/xddp/xddp.c index 258411c..d6cb871 100644 --- a/testsuite/smokey/xddp/xddp.c +++ b/testsuite/smokey/xddp/xddp.c @@ -87,7 +87,7 @@ static void *realtime_thread1(void *arg) fail("recvfrom"); } - smokey_note("%s: %ld relayed by peer", __FUNCTION__, data); + smokey_trace("%s: %ld relayed by peer", __FUNCTION__, data); } return NULL; @@ -150,8 +150,8 @@ static void *realtime_thread2(void *arg) if (ret || addrlen != sizeof(saddr)) fail("getpeername"); - smokey_note("%s: NRT peer is reading from /dev/rtp%d", - __FUNCTION__, saddr.sipc_port); + smokey_trace("%s: NRT peer is reading from /dev/rtp%d", + __FUNCTION__, saddr.sipc_port); FD_ZERO(&set); FD_SET(s, &set); @@ -173,7 +173,7 @@ static void *realtime_thread2(void *arg) if (ret != sizeof(data)) fail("sendto"); - smokey_note("%s: sent %d bytes, %ld", __FUNCTION__, ret, data); + smokey_trace("%s: sent %d bytes, %ld", __FUNCTION__, ret, data); ts.tv_sec = 0; ts.tv_nsec = 100000000; /* 100 ms */ _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org http://xenomai.org/mailman/listinfo/xenomai-git