forked from Imagelibrary/rtems
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:
@@ -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(
|
||||
|
||||
@@ -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 ***
|
||||
|
||||
Reference in New Issue
Block a user