+2016-11-07 Gabriel F. T. Gomes <gftg@linux.vnet.ibm.com>
+
+ * nptl/tst-kill3.c (handler): Use write_message in place of write.
+ * nptl/tst-kill6.c (handler): Likewise.
+ * nptl/tst-tls2.c (CB): Likewise.
+ * nptl/tst-tls3.c (CB): Likewise.
+
2016-11-07 Joseph Myers <joseph@codesourcery.com>
* scripts/check-installed-headers.sh: Ignore sys/sysctl.h for x32.
#include <sys/time.h>
+static int do_test (void);
+
+#define TIMEOUT 5
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
+
static pthread_cond_t c = PTHREAD_COND_INITIALIZER;
static pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;
static pthread_barrier_t b;
static void
handler (int sig)
{
- write (1, "handler called\n", 15);
+ write_message ("handler called\n");
_exit (1);
}
return 0;
}
-
-
-#define TIMEOUT 5
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
#include <unistd.h>
+static int do_test (void);
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
+
static pthread_t receiver;
static sem_t sem;
static pthread_barrier_t b;
{
if (sig != SIGUSR1)
{
- write (STDOUT_FILENO, "wrong signal\n", 13);
+ write_message ("wrong signal\n");
_exit (1);
}
if (pthread_self () != receiver)
{
- write (STDOUT_FILENO, "not the intended receiver\n", 26);
+ write_message ("not the intended receiver\n");
_exit (1);
}
if (sem_post (&sem) != 0)
{
- write (STDOUT_FILENO, "sem_post failed\n", 16);
+ write_message ("sem_post failed\n");
_exit (1);
}
}
return 0;
}
-
-
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
static pthread_t th[N];
+static int do_test (void);
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
+
#define CB(n) \
static void \
cb##n (void) \
{ \
if (th[n] != pthread_self ()) \
{ \
- write (STDOUT_FILENO, "wrong callback\n", 15); \
+ write_message ("wrong callback\n"); \
_exit (1); \
} \
}
{
if (sig != THE_SIG)
{
- write (STDOUT_FILENO, "wrong signal\n", 13);
+ write_message ("wrong signal\n");
_exit (1);
}
if (sem_post (&s) != 0)
{
- write (STDOUT_FILENO, "sem_post failed\n", 16);
+ write_message ("sem_post failed\n");
_exit (1);
}
}
return 0;
}
-
-
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
static pthread_t th[N];
+static int do_test (void);
+
+#define TIMEOUT 5
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
+
#define CB(n) \
static void \
cb##n (void) \
{ \
if (th[n] != pthread_self ()) \
{ \
- write (STDOUT_FILENO, "wrong callback\n", 15); \
+ write_message ("wrong callback\n"); \
_exit (1); \
} \
}
return 0;
}
-
-
-#define TIMEOUT 5
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"