diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-18 11:09:10 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-18 11:11:21 +0200 |
commit | ae0f048ff3216ac36d880ce3b9651bd9a1db676c (patch) | |
tree | 17b8cc5775977bf090d9160c23e3213ed32789c0 | |
parent | posix: Fix return states of pthread_kill() (diff) | |
download | rtems-ae0f048ff3216ac36d880ce3b9651bd9a1db676c.tar.bz2 |
psxtests/psxualarm: Avoid output in signal handler
Avoid output in signal handler to not disturb the timings which are
checked in this test. Use asserts to ensure proper signal handler
invocations.
-rw-r--r-- | testsuites/psxtests/psxualarm/init.c | 11 | ||||
-rw-r--r-- | testsuites/psxtests/psxualarm/psxualarm.scn | 10 |
2 files changed, 7 insertions, 14 deletions
diff --git a/testsuites/psxtests/psxualarm/init.c b/testsuites/psxtests/psxualarm/init.c index 1ec6473efa..7a4fb21b99 100644 --- a/testsuites/psxtests/psxualarm/init.c +++ b/testsuites/psxtests/psxualarm/init.c @@ -20,19 +20,14 @@ const char rtems_test_name[] = "PSXUALARM"; -volatile int Signal_count; +static volatile int Signal_count; static void Signal_handler( int signo ) { - Signal_count++; - printf( - "Signal: %d caught by 0x%" PRIxpthread_t " (%d)\n", - signo, - pthread_self(), - Signal_count - ); + rtems_test_assert( signo == SIGALRM ); + ++Signal_count; } void *POSIX_Init( diff --git a/testsuites/psxtests/psxualarm/psxualarm.scn b/testsuites/psxtests/psxualarm/psxualarm.scn index eca799a438..83313b589b 100644 --- a/testsuites/psxtests/psxualarm/psxualarm.scn +++ b/testsuites/psxtests/psxualarm/psxualarm.scn @@ -1,8 +1,6 @@ -*** POSIX TEST UALARM *** +*** BEGIN OF TEST PSXUALARM *** Init's ID is 0x0b010001 -Init: ualarm in 1 us +Init: ualarm in 500000 us Init: Unblock SIGALRM -Signal: 14 caught by 0xb010001 (1) -Signal: 14 caught by 0xb010001 (2) -Init: clear ualarm with 0,0 -*** END OF POSIX TEST UALARM *** +Init: clear ualarm with 0, 0 +*** END OF TEST PSXUALARM *** |