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.
This commit is contained in:
Sebastian Huber
2016-05-18 11:09:10 +02:00
parent 3c20d2810a
commit ae0f048ff3
2 changed files with 7 additions and 14 deletions

View File

@@ -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(

View File

@@ -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 ***