@@ -5,7 +5,7 @@ extern int successful_rtld_next_test (void);
extern void *failing_rtld_next_use (void);
-static int
+int
do_test (void)
{
int result;
@@ -40,5 +40,4 @@ do_test (void)
return result;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -18,8 +18,7 @@ handler (int sig)
}
-#define TEST_FUNCTION do_test ()
-static int
+int
do_test (void)
{
/* We are testing the two possibilities to mark an object as not deletable:
@@ -208,4 +207,4 @@ do_test (void)
return result;
}
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -4,7 +4,7 @@
int call_puts;
-static int
+int
do_test (void)
{
call_puts = 1;
@@ -34,8 +34,7 @@ do_test (void)
return 0;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
static void
__attribute__ ((destructor))
@@ -25,7 +25,7 @@
extern int internal_function _dl_addr_inside_object (struct link_map *l,
const ElfW(Addr) addr);
-static int
+int
do_test (void)
{
int ret, err = 0;
@@ -219,5 +219,4 @@ do_test (void)
return err;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -2,7 +2,7 @@
#include <stdio.h>
#include <string.h>
-static int
+int
do_test (void)
{
Dl_info i;
@@ -22,5 +22,4 @@ do_test (void)
&& strcmp (i.dli_sname, "_IO_printf") != 0);
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -20,7 +20,7 @@
#include <stdio.h>
#include <stdlib.h>
-static int
+int
do_test (void)
{
static const char modname[] = "tst-alignmod.so";
@@ -49,5 +49,4 @@ do_test (void)
return result;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -43,7 +43,7 @@ static void __attribute__ ((destructor)) des (void)
write (fds[1], &c, 1);
}
-static int
+int
do_test (void)
{
if (!res)
@@ -152,5 +152,4 @@ do_test (void)
return result;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -32,5 +32,4 @@ do_test (void)
return 0;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -45,5 +45,4 @@ do_test (void)
return 0;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -40,7 +40,7 @@ calloc (size_t n, size_t m)
return ptr;
}
-static int
+int
do_test (void)
{
/* Make sure that our calloc is called from the dynamic linker at least
@@ -57,5 +57,4 @@ do_test (void)
return 0;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -1,6 +1,6 @@
#include <dlfcn.h>
-static int
+int
do_test (void)
{
void *h = dlopen("$ORIGIN/tst-auditmod9b.so", RTLD_LAZY);
@@ -8,5 +8,4 @@ do_test (void)
return fp() - 1;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -23,7 +23,7 @@
#include <unistd.h>
#include <misc/sys/auxv.h>
-static int
+int
do_test (int argc, char *argv[])
{
errno = 0;
@@ -66,4 +66,5 @@ do_test (int argc, char *argv[])
return 0;
}
-#include "../test-skeleton.c"
+#define TEST_FUNCTION_ARGV do_test
+#include <support/test-driver.c>
@@ -17,7 +17,7 @@ back (void)
extern int foo (void);
-static int
+int
do_test (void)
{
void *p = dlopen ("$ORIGIN/tst-deep1mod2.so", RTLD_LAZY|RTLD_DEEPBIND);
@@ -32,5 +32,4 @@ do_test (void)
return foo () + f ();
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -32,7 +32,7 @@ callback (struct dl_phdr_info *info, size_t size, void *data)
return 0;
}
-static int
+int
do_test (void)
{
int count = 0;
@@ -43,5 +43,4 @@ do_test (void)
return status || count != 1;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -92,7 +92,7 @@ unload (const char *path, void *handle)
dl_iterate_phdr (callback, (void *)(intptr_t) REMOVE);
}
-static int
+int
do_test (void)
{
void *handle1, *handle2;
@@ -105,5 +105,4 @@ do_test (void)
return 0;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -4,7 +4,7 @@
#define TEST_SO "$ORIGIN/tst-dlmopen1mod.so"
-static int
+int
do_test (void)
{
void *h = dlopen (LIBC_SO, RTLD_LAZY|RTLD_NOLOAD);
@@ -77,5 +77,4 @@ do_test (void)
return 0;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -5,7 +5,7 @@
#include <ldsodefs.h>
-static int
+int
do_test (void)
{
int result = 0;
@@ -66,5 +66,4 @@ round %d, namespace %d: duplicate allocate of namespace %ld",
return result;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -2,7 +2,7 @@
#include <stdio.h>
-static int
+int
do_test (void)
{
void *h = dlmopen (LM_ID_NEWLM, "$ORIGIN/tst-dlmopen1mod.so", RTLD_LAZY);
@@ -18,5 +18,4 @@ do_test (void)
return 0;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -64,4 +64,4 @@ do_test (int argc, char *argv[])
}
#define TEST_FUNCTION do_test (argc, argv)
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -29,7 +29,7 @@ extern int foo (void);
static const char testsubdir[] = PFX "test-subdir";
-static int
+int
do_test (void)
{
struct stat64 st;
@@ -67,5 +67,4 @@ do_test (void)
return result;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -97,7 +97,7 @@ dlvsym_glibc_private (void *handle, const char *name)
return dlvsym (handle, name, "GLIBC_PRIVATE");
}
-static int
+int
do_test (void)
{
test_handles ("dlsym", dlsym, "");
@@ -110,5 +110,4 @@ do_test (void)
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -11,7 +11,7 @@ extern void tryme (void); /* from tst-execstack-mod.so */
static void deeper (void (*f) (void));
-static int
+int
do_test (void)
{
tryme ();
@@ -31,6 +31,4 @@ deeper (void (*f) (void))
memfrob (stack, sizeof stack);
}
-
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -10,7 +10,7 @@
static void deeper (void (*f) (void));
-static int
+int
do_test (void)
{
tryme ();
@@ -30,6 +30,4 @@ deeper (void (*f) (void))
memfrob (stack, sizeof stack);
}
-
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -50,7 +50,7 @@ waiter_thread (void *arg)
static bool allow_execstack = true;
-static int
+int
do_test (void)
{
/* Check whether SELinux is enabled and disallows executable stacks. */
@@ -233,5 +233,4 @@ deeper (void (*f) (void))
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -1,7 +1,7 @@
#include <dlfcn.h>
#include <stdio.h>
-static int
+int
do_test (void)
{
void *h1 = dlopen ("$ORIGIN/testobj6.so", RTLD_GLOBAL|RTLD_LAZY);
@@ -35,5 +35,4 @@ do_test (void)
return 0;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -28,7 +28,7 @@ extern int test_ld (int);
__thread int gd = 1;
-static int
+int
do_test (void)
{
int *p;
@@ -48,5 +48,4 @@ do_test (void)
return 0;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -23,7 +23,7 @@
#include <sys/wait.h>
#include <unistd.h>
-static int
+int
do_test (void)
{
void *handle = dlopen ("tst-latepthreadmod.so", RTLD_LOCAL | RTLD_LAZY);
@@ -101,5 +101,4 @@ do_test (void)
return 0;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -3,7 +3,7 @@
#include <mcheck.h>
#include <stdlib.h>
-static int
+int
do_test (void)
{
mtrace ();
@@ -24,5 +24,4 @@ do_test (void)
return ret;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -42,6 +42,11 @@ void *references[] =
&getaddrinfo_a, /* libanl */
};
-/* This is a link-time test. There is nothing to run here. */
-#define TEST_FUNCTION 0
-#include "../test-skeleton.c"
+int
+do_test (void)
+{
+ /* This is a link-time test. There is nothing to run here. */
+ return 0;
+}
+
+#include <support/test-driver.c>
@@ -65,5 +65,4 @@ do_test (void)
return 0;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -2,7 +2,7 @@
#include <stdio.h>
#include <stdlib.h>
-static int
+int
do_test (void)
{
int result = 0;
@@ -47,5 +47,4 @@ do_test (void)
return result;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -3,7 +3,7 @@
#include <stdlib.h>
#include <gnu/lib-names.h>
-static int
+int
do_test (void)
{
int result = 0;
@@ -33,5 +33,4 @@ do_test (void)
return result;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -21,7 +21,7 @@
#include <stdio.h>
#include <gnu/lib-names.h>
-static int
+int
do_test (void)
{
/* Test that no object is loaded with RTLD_NOLOAD. */
@@ -69,5 +69,4 @@ do_test (void)
return 0;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -32,4 +32,5 @@ do_test (int argc, char **argv)
return 0;
}
-#include <test-skeleton.c>
+#define TEST_FUNCTION_ARGV do_test
+#include <support/test-driver.c>
@@ -2,12 +2,11 @@
#include <unistd.h>
#include <stdlib.h>
-static int
+int
do_test (void)
{
printf( "main\n" );
exit(EXIT_SUCCESS);
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -4,7 +4,7 @@
#include <stdlib.h>
-static int
+int
do_test (void)
{
void *h;
@@ -38,5 +38,4 @@ do_test (void)
return result;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -31,11 +31,10 @@ init_g (void)
g += 1;
}
-static int
+int
do_test (void)
{
return 0;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -6,7 +6,7 @@ foo (void)
return 21;
}
-static int
+int
do_test (void)
{
int val = foo ();
@@ -19,5 +19,4 @@ do_test (void)
return 0;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -19,12 +19,11 @@
#include <stdio.h>
-static int
+int
do_test (void)
{
fprintf (stdout, "hello\n");
return 0;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -40,10 +40,8 @@ extern int do_test (void);
int protected2 = -1;
-#define TEST_FUNCTION do_test ()
-
/* This defines the `main' function and some more. */
-#include <test-skeleton.c>
+#include <support/test-driver.c>
int
do_test (void)
@@ -40,10 +40,8 @@ extern int do_test (void);
int protected2 = -1;
-#define TEST_FUNCTION do_test ()
-
/* This defines the `main' function and some more. */
-#include <test-skeleton.c>
+#include <support/test-driver.c>
int
do_test (void)
@@ -25,6 +25,12 @@
#include <tls.h>
#include <unistd.h>
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+/* Requires _GNU_SOURCE */
+#include <getopt.h>
+
#ifndef POINTER_CHK_GUARD
extern uintptr_t __pointer_chk_guard;
# define POINTER_CHK_GUARD __pointer_chk_guard
@@ -53,7 +59,7 @@ uintptr_t_cmp (const void *a, const void *b)
return 0;
}
-static int
+int
do_test (void)
{
if (!ptr_chk_guard_copy_set)
@@ -191,12 +197,21 @@ do_test (void)
#define CMDLINE_OPTIONS \
{ "command", required_argument, NULL, OPT_COMMAND }, \
{ "child", no_argument, NULL, OPT_CHILD },
-#define CMDLINE_PROCESS \
- case OPT_COMMAND: \
- command = optarg; \
- break; \
- case OPT_CHILD: \
- child = true; \
- break;
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+
+static void __attribute((used))
+cmdline_process_function (int c)
+{
+ switch (c)
+ {
+ case OPT_COMMAND:
+ command = optarg;
+ break;
+ case OPT_CHILD:
+ child = true;
+ break;
+ }
+}
+
+#define CMDLINE_PROCESS cmdline_process_function
+
+#include <support/test-driver.c>
@@ -2,7 +2,7 @@
#include <stdio.h>
-static int
+int
do_test (void)
{
const char lib[] = "$ORIGIN/tst-relsort1mod1.so";
@@ -15,5 +15,4 @@ do_test (void)
return 0;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -17,6 +17,7 @@
<http://www.gnu.org/licenses/>. */
#include <errno.h>
+#include <getopt.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
@@ -49,7 +50,7 @@ uintptr_t_cmp (const void *a, const void *b)
return 0;
}
-static int
+int
do_test (void)
{
if (!stack_chk_guard_copy_set)
@@ -185,12 +186,20 @@ do_test (void)
#define CMDLINE_OPTIONS \
{ "command", required_argument, NULL, OPT_COMMAND }, \
{ "child", no_argument, NULL, OPT_CHILD },
-#define CMDLINE_PROCESS \
- case OPT_COMMAND: \
- command = optarg; \
- break; \
- case OPT_CHILD: \
- child = true; \
- break;
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+
+static void __attribute__((used))
+cmdline_process_function (int c)
+{
+ switch (c)
+ {
+ case OPT_COMMAND:
+ command = optarg;
+ break;
+ case OPT_CHILD:
+ child = true;
+ break;
+ }
+}
+#define CMDLINE_PROCESS cmdline_process_function
+
+#include <support/test-driver.c>
@@ -28,7 +28,7 @@ tf (void *arg)
}
-static int
+int
do_test (void)
{
#define N 10
@@ -55,5 +55,4 @@ do_test (void)
return 0;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -3,8 +3,7 @@
#include <stdlib.h>
-#define TEST_FUNCTION do_test ()
-static int
+int
do_test (void)
{
static const char modname[] = "tst-tlsmod2.so";
@@ -83,4 +82,4 @@ do_test (void)
}
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -24,15 +24,16 @@
#include "tst-tls-manydynamic.h"
+#include <errno.h>
#include <dlfcn.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-static int do_test (void);
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+int do_test (void);
+#include <support/xthread.h>
+#include <support/test-driver.c>
void *handles[COUNT];
set_value_func set_value_funcs[COUNT];
@@ -97,7 +98,7 @@ blocked_thread_func (void *closure)
return NULL;
}
-static int
+int
do_test (void)
{
{
@@ -9,8 +9,7 @@ COMMON_INT_DEF(foo);
COMMON_INT_DEF(bar);
-#define TEST_FUNCTION do_test ()
-static int
+int
do_test (void)
{
int result = 0;
@@ -80,4 +79,4 @@ do_test (void)
}
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -36,5 +36,4 @@ do_test (void)
exit (0);
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -5,7 +5,7 @@
if (p->a != S || p->b != S + 1 || p->c != S + 2) \
abort ()
-static int
+int
do_test (void)
{
struct A *p;
@@ -25,5 +25,4 @@ do_test (void)
exit (0);
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -5,7 +5,7 @@
if (p->a != S || p->b != S + 1 || p->c != S + 2) \
abort ()
-static int
+int
do_test (void)
{
struct A *p;
@@ -16,5 +16,4 @@ do_test (void)
exit (0);
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -5,7 +5,7 @@
#include <unistd.h>
-static int
+int
do_test (void)
{
for (int i = 0; i < 1000;)
@@ -25,5 +25,4 @@ do_test (void)
return 0;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -17,7 +17,7 @@ static struct foo g;
extern int in_dso1 (void);
-static int
+int
do_test (void)
{
int result = 0;
@@ -51,5 +51,4 @@ do_test (void)
return result;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -2,7 +2,7 @@
#include <stdlib.h>
#include <stdio.h>
-static int
+int
do_test (void)
{
void *h = dlopen ("tst-tlsmod15a.so", RTLD_NOW);
@@ -29,5 +29,4 @@ do_test (void)
return fp ();
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -2,7 +2,7 @@
#include <stdlib.h>
#include <stdio.h>
-static int
+int
do_test (void)
{
void *h = dlopen ("tst-tlsmod16a.so", RTLD_LAZY | RTLD_GLOBAL);
@@ -49,5 +49,4 @@ do_test (void)
return 0;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -2,7 +2,7 @@
#include <stdlib.h>
#include <stdio.h>
-static int
+int
do_test (void)
{
void *h = dlopen ("tst-tlsmod17b.so", RTLD_LAZY);
@@ -25,5 +25,4 @@ do_test (void)
return 0;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -2,7 +2,7 @@
#include <stdlib.h>
#include <stdio.h>
-static int
+int
do_test (void)
{
char modname[sizeof "tst-tlsmod18aXX.so"];
@@ -34,5 +34,4 @@ do_test (void)
return 0;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -3,7 +3,7 @@
#include <dlfcn.h>
-static int
+int
do_test (void)
{
void* dl = dlopen ("tst-tls19mod1.so", RTLD_LAZY | RTLD_GLOBAL);
@@ -23,5 +23,4 @@ do_test (void)
return fn ();
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -9,8 +9,7 @@ VAR_INT_DEF(foo);
VAR_INT_DEF(bar);
-#define TEST_FUNCTION do_test ()
-static int
+int
do_test (void)
{
int result = 0;
@@ -80,4 +79,4 @@ do_test (void)
}
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -13,8 +13,7 @@ VAR_INT_DEF(baz);
extern int in_dso (void);
-#define TEST_FUNCTION do_test ()
-static int
+int
do_test (void)
{
int result = 0;
@@ -65,4 +64,4 @@ do_test (void)
}
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -3,8 +3,7 @@
#include <stdlib.h>
-#define TEST_FUNCTION do_test ()
-static int
+int
do_test (void)
{
static const char modname[] = "tst-tlsmod2.so";
@@ -47,4 +46,4 @@ do_test (void)
}
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -3,8 +3,7 @@
#include <stdlib.h>
-#define TEST_FUNCTION do_test ()
-static int
+int
do_test (void)
{
static const char modname[] = "tst-tlsmod2.so";
@@ -63,4 +62,4 @@ do_test (void)
}
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -5,8 +5,7 @@
#include <link.h>
-#define TEST_FUNCTION do_test ()
-static int
+int
do_test (void)
{
static const char modname[] = "tst-tlsmod2.so";
@@ -82,4 +81,4 @@ do_test (void)
}
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -5,8 +5,7 @@
#include <link.h>
-#define TEST_FUNCTION do_test ()
-static int
+int
do_test (void)
{
static const char modname[] = "tst-tlsmod3.so";
@@ -53,4 +52,4 @@ do_test (void)
}
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -5,8 +5,7 @@
#include <link.h>
-#define TEST_FUNCTION do_test ()
-static int
+int
do_test (void)
{
static const char modname1[] = "$ORIGIN/tst-tlsmod3.so";
@@ -165,5 +164,4 @@ do_test (void)
return result;
}
-
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -4,8 +4,7 @@
#include <link.h>
-#define TEST_FUNCTION do_test ()
-static int
+int
do_test (void)
{
static const char modname1[] = "tst-tlsmod5.so";
@@ -34,4 +33,4 @@ do_test (void)
}
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -54,7 +54,7 @@ test_one (const char *which, unsigned int alignment, int *var, int value)
return misalign != 0;
}
-static int
+int
do_test (void)
{
int fail = 0;
@@ -70,5 +70,4 @@ do_test (void)
return fail ? EXIT_FAILURE : EXIT_SUCCESS;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -55,7 +55,7 @@ test_one (const char *which, unsigned int alignment, int *var, int value)
return misalign != 0;
}
-static int
+int
do_test (void)
{
int fail = 0;
@@ -81,5 +81,4 @@ do_test (void)
return fail ? EXIT_FAILURE : EXIT_SUCCESS;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -3,7 +3,7 @@
#include <stdio.h>
#include <sys/mman.h>
-static int
+int
do_test (void)
{
void *h1 = dlopen ("tst-unique1mod1.so", RTLD_LAZY);
@@ -70,5 +70,4 @@ do_test (void)
return 0;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -4,7 +4,7 @@
extern int var;
-static int
+int
do_test (void)
{
var = 1;
@@ -24,5 +24,4 @@ do_test (void)
return f (&var);
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
@@ -29,10 +29,9 @@
/* Prototype for our test function. */
extern int do_test (void);
-#define TEST_FUNCTION do_test ()
/* This defines the `main' function and some more. */
-#include <test-skeleton.c>
+#include <support/test-driver.c>
/* Prototypes for local functions. */