Update test/* directory, it seem to be a bit bit-rotted
Added README; modified sigkill_rain.c to be more understandable,
made clone.c compile; added wait_must_be_interruptible.c test;
updated Makefile and .gitignore.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
diff --git a/test/sigkill_rain.c b/test/sigkill_rain.c
index dd83a69..01b8986 100644
--- a/test/sigkill_rain.c
+++ b/test/sigkill_rain.c
@@ -1,12 +1,10 @@
-/* This test is not yet added to Makefile */
-
#include <stdlib.h>
#include <stddef.h>
#include <unistd.h>
#include <signal.h>
-
#include <sys/types.h>
#include <sys/socket.h>
+#include <stdio.h>
static const struct sockaddr sa;
@@ -16,6 +14,12 @@
int pid;
sigset_t set;
+ printf(
+"Please run me under 'strace -f -oLOG', and examine LOG file for incorrect\n"
+"decoding of interrupted syscalls: grep for 'sendto', '??" /* anti-trigraph gap */ "?', 'unavailable'.\n"
+"Pass number of iterations in argv[1] (default: 999).\n"
+ );
+
sigemptyset(&set);
sigaddset(&set, SIGCHLD);
sigprocmask(SIG_BLOCK, &set, NULL);
@@ -57,7 +61,7 @@
*/
switch (loops & 1) {
case 0:
- break; /* intentional empty */
+ break; /* intentionally empty */
case 1:
sendto(-1, "Hello cruel world", 17, 0, &sa, sizeof(sa));
break;