diff options
Diffstat (limited to 'tests/cris')
-rw-r--r-- | tests/cris/Makefile | 1 | ||||
-rw-r--r-- | tests/cris/check_sigalrm.c | 26 |
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/cris/Makefile b/tests/cris/Makefile index 47c93f2a45..69068996f7 100644 --- a/tests/cris/Makefile +++ b/tests/cris/Makefile @@ -114,6 +114,7 @@ TESTCASES += check_mapbrk.ctst TESTCASES += check_mmap1.ctst TESTCASES += check_mmap2.ctst TESTCASES += check_mmap3.ctst +TESTCASES += check_sigalrm.ctst TESTCASES += check_time1.ctst TESTCASES += check_time2.ctst diff --git a/tests/cris/check_sigalrm.c b/tests/cris/check_sigalrm.c new file mode 100644 index 0000000000..39fa8d9bac --- /dev/null +++ b/tests/cris/check_sigalrm.c @@ -0,0 +1,26 @@ +#include <stdio.h> +#include <stdlib.h> +#include <signal.h> +#include <unistd.h> + +#define MAGIC (0xdeadbeef) + +int s = 0; +void sighandler(int sig) +{ + s = MAGIC; +} + +int main(int argc, char **argv) +{ + int p; + + p = getpid(); + signal(SIGALRM, sighandler); + kill(p, SIGALRM); + if (s != MAGIC) + return EXIT_FAILURE; + + printf ("passed\n"); + return EXIT_SUCCESS; +} |