summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.c2
-rw-r--r--signal.c13
-rw-r--r--signal.d9
-rw-r--r--signal.defs2
4 files changed, 25 insertions, 1 deletions
diff --git a/main.c b/main.c
index c6436c4..55fcfcc 100644
--- a/main.c
+++ b/main.c
@@ -51,7 +51,7 @@ int main(int argc, char *argv[])
test_locale_h();
/* test_math_h(); */
/* test_setjmp_h(); */
- /* test_signal_h(); */
+ test_signal_h();
/* test_stdalign_h(); */
/* test_stdarg_h(); */
/* test_stdatomic_h(); */
diff --git a/signal.c b/signal.c
new file mode 100644
index 0000000..13aa074
--- /dev/null
+++ b/signal.c
@@ -0,0 +1,13 @@
+#include <signal.h>
+#include "test.h"
+
+#include "signal.d"
+
+void test_signal_h(void)
+{
+ testing_header("signal.h");
+
+ test_distinct(signals);
+
+ testing_end();
+}
diff --git a/signal.d b/signal.d
new file mode 100644
index 0000000..233e8b1
--- /dev/null
+++ b/signal.d
@@ -0,0 +1,9 @@
+static sig_atomic_t a_sig_atomic_t;
+
+static int signals[] = {
+ SIGABRT,
+ SIGFPE,
+ SIGILL,
+ SIGINT,
+ SIGSEGV,
+};
diff --git a/signal.defs b/signal.defs
new file mode 100644
index 0000000..5640f97
--- /dev/null
+++ b/signal.defs
@@ -0,0 +1,2 @@
+type sig_atomic_t
+distinct signals SIGABRT SIGFPE SIGILL SIGINT SIGSEGV SIGTERM