ce426f
commit 29955b5d9658b02d3a678d1f785db3d1e63184ca
ce426f
Author: Arjun Shankar <arjun.is@lostca.se>
ce426f
Date:   Wed Nov 5 15:24:08 2014 +0530
ce426f
ce426f
    Modify several tests to use test-skeleton.c
ce426f
    
ce426f
    This patch modifies several test cases to use test-skeleton.c.
ce426f
    It was generated by a bash script written for this purpose and
ce426f
    thus excludes several other tests which I deemed worth a visual
ce426f
    inspection before making the change.
ce426f
    
ce426f
    I intend to follow up with individual patches to the tests
ce426f
    skipped by the script.
ce426f
    
ce426f
    The script itself resides at http://git.io/WODAmg and should
ce426f
    reproduce this very patch when run against master.
ce426f
    
ce426f
    ChangeLog:
ce426f
    
ce426f
    2014-10-30  Arjun Shankar  <arjun.is@lostca.se>
ce426f
    
ce426f
    	* catgets/test-gencat.c: Use test-skeleton.c.
ce426f
    	* catgets/tst-catgets.c: Likewise.
ce426f
    	* csu/tst-empty.c: Likewise.
ce426f
    	* elf/tst-audit2.c: Likewise.
ce426f
    	* elf/tst-global1.c: Likewise.
ce426f
    	* elf/tst-pathopt.c: Likewise.
ce426f
    	* elf/tst-piemod1.c: Likewise.
ce426f
    	* elf/tst-tls10.c: Likewise.
ce426f
    	* elf/tst-tls11.c: Likewise.
ce426f
    	* elf/tst-tls12.c: Likewise.
ce426f
    	* gnulib/tst-gcc.c: Likewise.
ce426f
    	* iconvdata/tst-e2big.c: Likewise.
ce426f
    	* iconvdata/tst-loading.c: Likewise.
ce426f
    	* iconv/tst-iconv1.c: Likewise.
ce426f
    	* iconv/tst-iconv2.c: Likewise.
ce426f
    	* inet/test-inet6_opt.c: Likewise.
ce426f
    	* inet/tst-gethnm.c: Likewise.
ce426f
    	* inet/tst-network.c: Likewise.
ce426f
    	* inet/tst-ntoa.c: Likewise.
ce426f
    	* intl/tst-codeset.c: Likewise.
ce426f
    	* intl/tst-gettext2.c: Likewise.
ce426f
    	* intl/tst-gettext3.c: Likewise.
ce426f
    	* intl/tst-ngettext.c: Likewise.
ce426f
    	* intl/tst-translit.c: Likewise.
ce426f
    	* io/test-stat.c: Likewise.
ce426f
    	* libio/test-fmemopen.c: Likewise.
ce426f
    	* libio/tst-freopen.c: Likewise.
ce426f
    	* libio/tst-sscanf.c: Likewise.
ce426f
    	* libio/tst-ungetwc1.c: Likewise.
ce426f
    	* libio/tst-ungetwc2.c: Likewise.
ce426f
    	* libio/tst-widetext.c: Likewise.
ce426f
    	* localedata/tst-ctype.c: Likewise.
ce426f
    	* localedata/tst-digits.c: Likewise.
ce426f
    	* localedata/tst-leaks.c: Likewise.
ce426f
    	* localedata/tst-mbswcs1.c: Likewise.
ce426f
    	* localedata/tst-mbswcs2.c: Likewise.
ce426f
    	* localedata/tst-mbswcs3.c: Likewise.
ce426f
    	* localedata/tst-mbswcs4.c: Likewise.
ce426f
    	* localedata/tst-mbswcs5.c: Likewise.
ce426f
    	* localedata/tst-setlocale.c: Likewise.
ce426f
    	* localedata/tst-trans.c: Likewise.
ce426f
    	* localedata/tst-wctype.c: Likewise.
ce426f
    	* localedata/tst-xlocale1.c: Likewise.
ce426f
    	* login/tst-grantpt.c: Likewise.
ce426f
    	* malloc/tst-calloc.c: Likewise.
ce426f
    	* malloc/tst-malloc.c: Likewise.
ce426f
    	* malloc/tst-mallocstate.c: Likewise.
ce426f
    	* malloc/tst-mcheck.c: Likewise.
ce426f
    	* malloc/tst-mtrace.c: Likewise.
ce426f
    	* malloc/tst-obstack.c: Likewise.
ce426f
    	* math/atest-exp2.c: Likewise.
ce426f
    	* math/atest-exp.c: Likewise.
ce426f
    	* math/atest-sincos.c: Likewise.
ce426f
    	* math/test-matherr.c: Likewise.
ce426f
    	* math/test-misc.c: Likewise.
ce426f
    	* math/test-powl.c: Likewise.
ce426f
    	* math/tst-definitions.c: Likewise.
ce426f
    	* misc/tst-dirname.c: Likewise.
ce426f
    	* misc/tst-efgcvt.c: Likewise.
ce426f
    	* misc/tst-fdset.c: Likewise.
ce426f
    	* misc/tst-hsearch.c: Likewise.
ce426f
    	* misc/tst-mntent2.c: Likewise.
ce426f
    	* nptl/tst-sem7.c: Likewise.
ce426f
    	* nptl/tst-sem8.c: Likewise.
ce426f
    	* nptl/tst-sem9.c: Likewise.
ce426f
    	* nss/test-netdb.c: Likewise.
ce426f
    	* posix/tst-fnmatch.c: Likewise.
ce426f
    	* posix/tst-getlogin.c: Likewise.
ce426f
    	* posix/tst-gnuglob.c: Likewise.
ce426f
    	* posix/tst-mmap.c: Likewise.
ce426f
    	* resolv/tst-inet_ntop.c: Likewise.
ce426f
    	* rt/tst-timer.c: Likewise.
ce426f
    	* stdio-common/test-fseek.c: Likewise.
ce426f
    	* stdio-common/test-popen.c: Likewise.
ce426f
    	* stdio-common/test-vfprintf.c: Likewise.
ce426f
    	* stdio-common/tst-cookie.c: Likewise.
ce426f
    	* stdio-common/tst-fileno.c: Likewise.
ce426f
    	* stdio-common/tst-gets.c: Likewise.
ce426f
    	* stdio-common/tst-obprintf.c: Likewise.
ce426f
    	* stdio-common/tst-perror.c: Likewise.
ce426f
    	* stdio-common/tst-sprintf2.c: Likewise.
ce426f
    	* stdio-common/tst-sprintf3.c: Likewise.
ce426f
    	* stdio-common/tst-sprintf.c: Likewise.
ce426f
    	* stdio-common/tst-swprintf.c: Likewise.
ce426f
    	* stdio-common/tst-tmpnam.c: Likewise.
ce426f
    	* stdio-common/tst-unbputc.c: Likewise.
ce426f
    	* stdio-common/tst-wc-printf.c: Likewise.
ce426f
    	* stdlib/tst-environ.c: Likewise.
ce426f
    	* stdlib/tst-fmtmsg.c: Likewise.
ce426f
    	* stdlib/tst-limits.c: Likewise.
ce426f
    	* stdlib/tst-rand48-2.c: Likewise.
ce426f
    	* stdlib/tst-rand48.c: Likewise.
ce426f
    	* stdlib/tst-random2.c: Likewise.
ce426f
    	* stdlib/tst-random.c: Likewise.
ce426f
    	* stdlib/tst-strtol.c: Likewise.
ce426f
    	* stdlib/tst-strtoll.c: Likewise.
ce426f
    	* stdlib/tst-xpg-basename.c: Likewise.
ce426f
    	* string/test-ffs.c: Likewise.
ce426f
    	* string/tst-bswap.c: Likewise.
ce426f
    	* string/tst-inlcall.c: Likewise.
ce426f
    	* string/tst-strtok.c: Likewise.
ce426f
    	* string/tst-strxfrm.c: Likewise.
ce426f
    	* sysdeps/x86_64/tst-audit10.c: Likewise.
ce426f
    	* elf/tst-audit3.c: Likewise.
ce426f
    	* elf/tst-audit4.c: Likewise.
ce426f
    	* elf/tst-audit5.c: Likewise.
ce426f
    	* time/tst-ftime_l.c: Likewise.
ce426f
    	* time/tst-getdate.c: Likewise.
ce426f
    	* time/tst-mktime3.c: Likewise.
ce426f
    	* time/tst-mktime.c: Likewise.
ce426f
    	* time/tst-posixtz.c: Likewise.
ce426f
    	* time/tst-strptime2.c: Likewise.
ce426f
    	* time/tst-strptime3.c: Likewise.
ce426f
    	* wcsmbs/tst-btowc.c: Likewise.
ce426f
    	* wcsmbs/tst-mbrtowc.c: Likewise.
ce426f
    	* wcsmbs/tst-mbsrtowcs.c: Likewise.
ce426f
    	* wcsmbs/tst-wchar-h.c: Likewise.
ce426f
    	* wcsmbs/tst-wcpncpy.c: Likewise.
ce426f
    	* wcsmbs/tst-wcrtomb.c: Likewise.
ce426f
    	* wcsmbs/tst-wcsnlen.c: Likewise.
ce426f
    	* wcsmbs/tst-wcstof.c: Likewise.
ce426f
ce426f
diff --git a/catgets/test-gencat.c b/catgets/test-gencat.c
ce426f
index eaa9b89..282974c 100644
ce426f
--- a/catgets/test-gencat.c
ce426f
+++ b/catgets/test-gencat.c
ce426f
@@ -3,8 +3,8 @@
ce426f
 #include <stdio.h>
ce426f
 #include <stdlib.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   nl_catd catalog;
ce426f
   setlocale (LC_ALL, "");
ce426f
@@ -29,3 +29,6 @@ main (void)
ce426f
 
ce426f
   return 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/catgets/tst-catgets.c b/catgets/tst-catgets.c
ce426f
index fdaa834..a0a4089 100644
ce426f
--- a/catgets/tst-catgets.c
ce426f
+++ b/catgets/tst-catgets.c
ce426f
@@ -14,8 +14,8 @@ static const char *msgs[] =
ce426f
 
ce426f
 #define ROUNDS 5
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int rnd;
ce426f
   int result = 0;
ce426f
@@ -64,3 +64,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/csu/tst-empty.c b/csu/tst-empty.c
ce426f
index 980dcd6..e99468e 100644
ce426f
--- a/csu/tst-empty.c
ce426f
+++ b/csu/tst-empty.c
ce426f
@@ -1,6 +1,9 @@
ce426f
 /* The most useful C program known to man.  */
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   return 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/elf/tst-audit2.c b/elf/tst-audit2.c
ce426f
index b4fa906..acad1b0 100644
ce426f
--- a/elf/tst-audit2.c
ce426f
+++ b/elf/tst-audit2.c
ce426f
@@ -31,8 +31,8 @@ calloc (size_t n, size_t m)
ce426f
   return ptr;
ce426f
 }
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   if (magic[1] != MAGIC1 || magic[0] != MAGIC2)
ce426f
     {
ce426f
@@ -42,3 +42,6 @@ main (void)
ce426f
 
ce426f
   return 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/elf/tst-global1.c b/elf/tst-global1.c
ce426f
index 1611b51..4df335c 100644
ce426f
--- a/elf/tst-global1.c
ce426f
+++ b/elf/tst-global1.c
ce426f
@@ -1,8 +1,8 @@
ce426f
 #include <dlfcn.h>
ce426f
 #include <stdio.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   void *h1 = dlopen ("$ORIGIN/testobj6.so", RTLD_GLOBAL|RTLD_LAZY);
ce426f
   if (h1 == NULL)
ce426f
@@ -34,3 +34,6 @@ main (void)
ce426f
 
ce426f
   return 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/elf/tst-pathopt.c b/elf/tst-pathopt.c
ce426f
index 1f7aac2..8d73ad4 100644
ce426f
--- a/elf/tst-pathopt.c
ce426f
+++ b/elf/tst-pathopt.c
ce426f
@@ -4,8 +4,8 @@
ce426f
 #include <stdlib.h>
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   void *h;
ce426f
   int (*fp) (int);
ce426f
@@ -37,3 +37,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/elf/tst-piemod1.c b/elf/tst-piemod1.c
ce426f
index ad439da..6e98b5f 100644
ce426f
--- a/elf/tst-piemod1.c
ce426f
+++ b/elf/tst-piemod1.c
ce426f
@@ -6,8 +6,8 @@ foo (void)
ce426f
   return 21;
ce426f
 }
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int val = foo ();
ce426f
   if (val != 34)
ce426f
@@ -18,3 +18,6 @@ main (void)
ce426f
 
ce426f
   return 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/elf/tst-tls10.c b/elf/tst-tls10.c
ce426f
index 347243f..eb1ecb9 100644
ce426f
--- a/elf/tst-tls10.c
ce426f
+++ b/elf/tst-tls10.c
ce426f
@@ -8,8 +8,8 @@ __thread struct A local = { 1, 2, 3 };
ce426f
   if (p->a != S || p->b != S + 1 || p->c != S + 2)	\
ce426f
     abort ()
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   struct A *p;
ce426f
   if (local.a != 1 || local.b != 2 || local.c != 3)
ce426f
@@ -35,3 +35,6 @@ main (void)
ce426f
 
ce426f
   exit (0);
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/elf/tst-tls11.c b/elf/tst-tls11.c
ce426f
index 8a2fef4..8ceac14 100644
ce426f
--- a/elf/tst-tls11.c
ce426f
+++ b/elf/tst-tls11.c
ce426f
@@ -5,8 +5,8 @@
ce426f
   if (p->a != S || p->b != S + 1 || p->c != S + 2)	\
ce426f
     abort ()
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   struct A *p;
ce426f
   check1 ();
ce426f
@@ -24,3 +24,6 @@ main (void)
ce426f
 
ce426f
   exit (0);
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/elf/tst-tls12.c b/elf/tst-tls12.c
ce426f
index 9086d17..8093894 100644
ce426f
--- a/elf/tst-tls12.c
ce426f
+++ b/elf/tst-tls12.c
ce426f
@@ -5,8 +5,8 @@
ce426f
   if (p->a != S || p->b != S + 1 || p->c != S + 2)	\
ce426f
     abort ()
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   struct A *p;
ce426f
   check1 ();
ce426f
@@ -15,3 +15,6 @@ main (void)
ce426f
 
ce426f
   exit (0);
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/gnulib/tst-gcc.c b/gnulib/tst-gcc.c
ce426f
index 71fab28..9f4ba83 100644
ce426f
--- a/gnulib/tst-gcc.c
ce426f
+++ b/gnulib/tst-gcc.c
ce426f
@@ -51,8 +51,8 @@
ce426f
   })
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int result = 0;
ce426f
   int __integer_type;
ce426f
@@ -71,3 +71,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/iconv/tst-iconv1.c b/iconv/tst-iconv1.c
ce426f
index d806ce6..0609f50 100644
ce426f
--- a/iconv/tst-iconv1.c
ce426f
+++ b/iconv/tst-iconv1.c
ce426f
@@ -5,8 +5,8 @@
ce426f
 #include <stdio.h>
ce426f
 #include <string.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   char utf8[5];
ce426f
   wchar_t ucs4[5];
ce426f
@@ -42,3 +42,6 @@ main (void)
ce426f
 
ce426f
   return 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/iconv/tst-iconv2.c b/iconv/tst-iconv2.c
ce426f
index 5036ad1..0672a51 100644
ce426f
--- a/iconv/tst-iconv2.c
ce426f
+++ b/iconv/tst-iconv2.c
ce426f
@@ -25,8 +25,8 @@
ce426f
 #include <string.h>
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   char buf[3];
ce426f
   const wchar_t wc[1] = L"a";
ce426f
@@ -97,3 +97,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/iconvdata/tst-e2big.c b/iconvdata/tst-e2big.c
ce426f
index 9533eb0..8de64b2 100644
ce426f
--- a/iconvdata/tst-e2big.c
ce426f
+++ b/iconvdata/tst-e2big.c
ce426f
@@ -95,10 +95,13 @@ test_tscii (void)
ce426f
   test ("TSCII", inbuf, sizeof (inbuf), 9);
ce426f
 }
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   test_euc_jisx0213 ();
ce426f
   test_tscii ();
ce426f
   return 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/iconvdata/tst-loading.c b/iconvdata/tst-loading.c
ce426f
index 0d8a959..eff9d78 100644
ce426f
--- a/iconvdata/tst-loading.c
ce426f
+++ b/iconvdata/tst-loading.c
ce426f
@@ -114,8 +114,8 @@ static const char inbuf[] =
ce426f
 "     function.  Later modifications of the variable have no effect.\n";
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   size_t count = TEST_ROUNDS;
ce426f
   int result = 0;
ce426f
@@ -180,3 +180,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/inet/test-inet6_opt.c b/inet/test-inet6_opt.c
ce426f
index 3bf319e..a7ebf00 100644
ce426f
--- a/inet/test-inet6_opt.c
ce426f
+++ b/inet/test-inet6_opt.c
ce426f
@@ -194,8 +194,8 @@ decode_inet6_opt (void *eb, socklen_t el)
ce426f
   return ret;
ce426f
 }
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   void *eb;
ce426f
   socklen_t el;
ce426f
@@ -206,3 +206,6 @@ main (void)
ce426f
     return 1;
ce426f
   return 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/inet/tst-gethnm.c b/inet/tst-gethnm.c
ce426f
index 8af44d6..dd3a547 100644
ce426f
--- a/inet/tst-gethnm.c
ce426f
+++ b/inet/tst-gethnm.c
ce426f
@@ -10,8 +10,8 @@
ce426f
 #include <netinet/in.h>
ce426f
 #include <arpa/inet.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   struct hostent *ent;
ce426f
   struct in_addr hostaddr;
ce426f
@@ -62,3 +62,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/inet/tst-network.c b/inet/tst-network.c
ce426f
index fc90bd7..cc840e0 100644
ce426f
--- a/inet/tst-network.c
ce426f
+++ b/inet/tst-network.c
ce426f
@@ -51,8 +51,8 @@ struct
ce426f
 };
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int errors = 0;
ce426f
   size_t i;
ce426f
@@ -76,3 +76,6 @@ main (void)
ce426f
 
ce426f
   return errors != 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/inet/tst-ntoa.c b/inet/tst-ntoa.c
ce426f
index 9be91eb..ef82d4d 100644
ce426f
--- a/inet/tst-ntoa.c
ce426f
+++ b/inet/tst-ntoa.c
ce426f
@@ -22,8 +22,8 @@ test (unsigned int inaddr, const char *expected)
ce426f
 }
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int result = 0;
ce426f
 
ce426f
@@ -34,3 +34,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/intl/tst-codeset.c b/intl/tst-codeset.c
ce426f
index f5b37ec..37f731e 100644
ce426f
--- a/intl/tst-codeset.c
ce426f
+++ b/intl/tst-codeset.c
ce426f
@@ -23,8 +23,8 @@
ce426f
 #include <stdlib.h>
ce426f
 #include <string.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   char *s;
ce426f
   int result = 0;
ce426f
@@ -55,3 +55,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/intl/tst-gettext2.c b/intl/tst-gettext2.c
ce426f
index 075680a..3c44165 100644
ce426f
--- a/intl/tst-gettext2.c
ce426f
+++ b/intl/tst-gettext2.c
ce426f
@@ -40,8 +40,8 @@ struct data_t strings[] =
ce426f
 const int lang_cnt = 3;
ce426f
 const char *lang[] = {"lang1", "lang2", "lang3"};
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int i;
ce426f
 
ce426f
@@ -70,3 +70,6 @@ main (void)
ce426f
 
ce426f
   return 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/intl/tst-gettext3.c b/intl/tst-gettext3.c
ce426f
index dd88987..11e9b08 100644
ce426f
--- a/intl/tst-gettext3.c
ce426f
+++ b/intl/tst-gettext3.c
ce426f
@@ -24,8 +24,8 @@
ce426f
 #include <stdlib.h>
ce426f
 #include <string.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   char *s;
ce426f
   int result = 0;
ce426f
@@ -57,3 +57,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/intl/tst-ngettext.c b/intl/tst-ngettext.c
ce426f
index 4fb0ca2..71e91b9 100644
ce426f
--- a/intl/tst-ngettext.c
ce426f
+++ b/intl/tst-ngettext.c
ce426f
@@ -25,8 +25,8 @@
ce426f
 #include <string.h>
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   const char *strs[2] = { "singular", "plural" };
ce426f
   unsigned long int i;
ce426f
@@ -63,3 +63,6 @@ main (void)
ce426f
 
ce426f
   return res;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/intl/tst-translit.c b/intl/tst-translit.c
ce426f
index 1aecee7..299fa40 100644
ce426f
--- a/intl/tst-translit.c
ce426f
+++ b/intl/tst-translit.c
ce426f
@@ -24,8 +24,8 @@
ce426f
 #include <string.h>
ce426f
 #include <unistd.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int result = 0;
ce426f
   const char *s;
ce426f
@@ -49,3 +49,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/io/test-stat.c b/io/test-stat.c
ce426f
index c5cfd26..e9c8468 100644
ce426f
--- a/io/test-stat.c
ce426f
+++ b/io/test-stat.c
ce426f
@@ -25,8 +25,8 @@
ce426f
 #include <stddef.h>
ce426f
 #include <sys/stat.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   /* With _FILE_OFFSET_BITS=64 struct stat and struct stat64 should
ce426f
      be identical.  */
ce426f
@@ -65,3 +65,6 @@ main (void)
ce426f
 #endif
ce426f
   return 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/libio/test-fmemopen.c b/libio/test-fmemopen.c
ce426f
index 3099894..211176e 100644
ce426f
--- a/libio/test-fmemopen.c
ce426f
+++ b/libio/test-fmemopen.c
ce426f
@@ -22,8 +22,8 @@ static char buffer[] = "foobar";
ce426f
 #include <stdio.h>
ce426f
 #include <string.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int ch;
ce426f
   FILE *stream;
ce426f
@@ -37,3 +37,6 @@ main (void)
ce426f
 
ce426f
   return 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/libio/tst-freopen.c b/libio/tst-freopen.c
ce426f
index f9e7177..94284ec 100644
ce426f
--- a/libio/tst-freopen.c
ce426f
+++ b/libio/tst-freopen.c
ce426f
@@ -22,8 +22,8 @@
ce426f
 #include <string.h>
ce426f
 #include <unistd.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   char name[] = "/tmp/tst-freopen.XXXXXX";
ce426f
   const char * const test = "Let's test freopen.\n";
ce426f
@@ -100,3 +100,6 @@ main (void)
ce426f
   unlink (name);
ce426f
   exit (0);
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/libio/tst-sscanf.c b/libio/tst-sscanf.c
ce426f
index b1a2b84..fb4be34 100644
ce426f
--- a/libio/tst-sscanf.c
ce426f
+++ b/libio/tst-sscanf.c
ce426f
@@ -3,8 +3,8 @@
ce426f
 
ce426f
 #define WCS_LENGTH 256
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   const char cnv[] ="%l[abc]";
ce426f
   const char str[] = "abbcXab";
ce426f
@@ -18,3 +18,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/libio/tst-ungetwc1.c b/libio/tst-ungetwc1.c
ce426f
index f74c407..f71b390 100644
ce426f
--- a/libio/tst-ungetwc1.c
ce426f
+++ b/libio/tst-ungetwc1.c
ce426f
@@ -7,8 +7,8 @@
ce426f
 #include <unistd.h>
ce426f
 #include <wchar.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   FILE *fp;
ce426f
   const char *str = "abcdef";
ce426f
@@ -79,3 +79,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/libio/tst-ungetwc2.c b/libio/tst-ungetwc2.c
ce426f
index d15e287..a7c5193 100644
ce426f
--- a/libio/tst-ungetwc2.c
ce426f
+++ b/libio/tst-ungetwc2.c
ce426f
@@ -7,8 +7,8 @@
ce426f
 #include <unistd.h>
ce426f
 #include <wchar.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   FILE *fp;
ce426f
   const char *str = "abcdef";
ce426f
@@ -79,3 +79,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/libio/tst-widetext.c b/libio/tst-widetext.c
ce426f
index 179763e..acab72b 100644
ce426f
--- a/libio/tst-widetext.c
ce426f
+++ b/libio/tst-widetext.c
ce426f
@@ -31,8 +31,8 @@
ce426f
 #define SIZE 210000
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   char name[] = "/tmp/widetext.out.XXXXXX";
ce426f
   char mbbuf[SIZE];
ce426f
@@ -367,3 +367,6 @@ main (void)
ce426f
 
ce426f
   return status;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/localedata/tst-ctype.c b/localedata/tst-ctype.c
ce426f
index ceda891..a4e8fcf 100644
ce426f
--- a/localedata/tst-ctype.c
ce426f
+++ b/localedata/tst-ctype.c
ce426f
@@ -61,8 +61,8 @@ static struct classes
ce426f
   }
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   const char *cp;
ce426f
   const char *cp2;
ce426f
@@ -447,3 +447,6 @@ punct = %04x  alnum = %04x\n",
ce426f
   printf ("  No errors for `%s' locale\n\n\n", setlocale (LC_ALL, NULL));
ce426f
   return 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/localedata/tst-digits.c b/localedata/tst-digits.c
ce426f
index 9b3ebcd..76356e9 100644
ce426f
--- a/localedata/tst-digits.c
ce426f
+++ b/localedata/tst-digits.c
ce426f
@@ -111,8 +111,8 @@ static struct wprintf_int_test
ce426f
   (sizeof (wprintf_int_tests) / sizeof (wprintf_int_tests[0]))
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int cnt;
ce426f
   int failures;
ce426f
@@ -246,3 +246,6 @@ main (void)
ce426f
 
ce426f
   return status;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/localedata/tst-leaks.c b/localedata/tst-leaks.c
ce426f
index 7a4b557..ccd44f2 100644
ce426f
--- a/localedata/tst-leaks.c
ce426f
+++ b/localedata/tst-leaks.c
ce426f
@@ -1,8 +1,8 @@
ce426f
 #include <locale.h>
ce426f
 #include <mcheck.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int cnt;
ce426f
 
ce426f
@@ -16,3 +16,6 @@ main (void)
ce426f
 
ce426f
   return 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/localedata/tst-mbswcs1.c b/localedata/tst-mbswcs1.c
ce426f
index 14f1372..1404829 100644
ce426f
--- a/localedata/tst-mbswcs1.c
ce426f
+++ b/localedata/tst-mbswcs1.c
ce426f
@@ -33,8 +33,8 @@
ce426f
     }									  \
ce426f
   putc ('\n', stdout)
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   const unsigned char buf[6] = { 0x25,  0xe2, 0x82, 0xac,  0xce, 0xbb };
ce426f
   mbstate_t state;
ce426f
@@ -60,3 +60,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/localedata/tst-mbswcs2.c b/localedata/tst-mbswcs2.c
ce426f
index 25fa951..9cd95d6 100644
ce426f
--- a/localedata/tst-mbswcs2.c
ce426f
+++ b/localedata/tst-mbswcs2.c
ce426f
@@ -35,8 +35,8 @@
ce426f
     }									\
ce426f
   putc ('\n', stdout)
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   unsigned char buf[6] = { 0x25,  0xe2, 0x82, 0xac,  0xce, 0xbb };
ce426f
   mbstate_t state;
ce426f
@@ -62,3 +62,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/localedata/tst-mbswcs3.c b/localedata/tst-mbswcs3.c
ce426f
index 8db65c5..a068541 100644
ce426f
--- a/localedata/tst-mbswcs3.c
ce426f
+++ b/localedata/tst-mbswcs3.c
ce426f
@@ -38,8 +38,8 @@
ce426f
     putc ('\n', stdout);						\
ce426f
   }
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   unsigned char buf[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
ce426f
   const unsigned char bufcheck[6] = { 0x25, 0xe2, 0x82, 0xac, 0xce, 0xbb };
ce426f
@@ -73,3 +73,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/localedata/tst-mbswcs4.c b/localedata/tst-mbswcs4.c
ce426f
index 09b7417..a4fe60d 100644
ce426f
--- a/localedata/tst-mbswcs4.c
ce426f
+++ b/localedata/tst-mbswcs4.c
ce426f
@@ -34,8 +34,8 @@
ce426f
     }									\
ce426f
   putc ('\n', stdout)
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   unsigned char buf[6] = { 0x25,  0xe2, 0x82, 0xac,  0xce, 0xbb };
ce426f
   mbstate_t state;
ce426f
@@ -60,3 +60,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/localedata/tst-mbswcs5.c b/localedata/tst-mbswcs5.c
ce426f
index e18862c..c44f12a 100644
ce426f
--- a/localedata/tst-mbswcs5.c
ce426f
+++ b/localedata/tst-mbswcs5.c
ce426f
@@ -37,8 +37,8 @@
ce426f
     putc ('\n', stdout);						\
ce426f
   }
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   unsigned char buf[7] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
ce426f
   const unsigned char bufcheck[7] = { 0x25, 0xe2, 0x82, 0xac, 0xce, 0xbb, 0 };
ce426f
@@ -72,3 +72,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/localedata/tst-setlocale.c b/localedata/tst-setlocale.c
ce426f
index 1f8e68d..a09a4de 100644
ce426f
--- a/localedata/tst-setlocale.c
ce426f
+++ b/localedata/tst-setlocale.c
ce426f
@@ -3,8 +3,8 @@
ce426f
 #include <stdio.h>
ce426f
 #include <string.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   char q[30];
ce426f
   char *s;
ce426f
@@ -23,3 +23,6 @@ main (void)
ce426f
 
ce426f
   return strcmp (s, "de_DE.UTF-8") != 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/localedata/tst-trans.c b/localedata/tst-trans.c
ce426f
index 5e09631..0b0be83 100644
ce426f
--- a/localedata/tst-trans.c
ce426f
+++ b/localedata/tst-trans.c
ce426f
@@ -24,8 +24,8 @@
ce426f
 #include <wchar.h>
ce426f
 #include <wctype.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   char buf[30];
ce426f
   wchar_t wbuf[30];
ce426f
@@ -68,3 +68,6 @@ main (void)
ce426f
 
ce426f
   return errors;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/localedata/tst-wctype.c b/localedata/tst-wctype.c
ce426f
index bd2b057..eb72030 100644
ce426f
--- a/localedata/tst-wctype.c
ce426f
+++ b/localedata/tst-wctype.c
ce426f
@@ -24,8 +24,8 @@
ce426f
 #include <wchar.h>
ce426f
 #include <wctype.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   wctype_t wct;
ce426f
   wchar_t buf[1000];
ce426f
@@ -141,3 +141,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/localedata/tst-xlocale1.c b/localedata/tst-xlocale1.c
ce426f
index 297c9ad..9f545a0 100644
ce426f
--- a/localedata/tst-xlocale1.c
ce426f
+++ b/localedata/tst-xlocale1.c
ce426f
@@ -20,8 +20,8 @@ static struct
ce426f
 #define ntests (sizeof (tests) / sizeof (tests[0]))
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   size_t cnt;
ce426f
   int result = 0;
ce426f
@@ -73,3 +73,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/login/tst-grantpt.c b/login/tst-grantpt.c
ce426f
index 5078dac..65bb344 100644
ce426f
--- a/login/tst-grantpt.c
ce426f
+++ b/login/tst-grantpt.c
ce426f
@@ -66,8 +66,8 @@ test_einval (void)
ce426f
   return ret;
ce426f
 }
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int result = 0;
ce426f
 
ce426f
@@ -76,3 +76,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/malloc/tst-calloc.c b/malloc/tst-calloc.c
ce426f
index 51e6c25..7ad5124 100644
ce426f
--- a/malloc/tst-calloc.c
ce426f
+++ b/malloc/tst-calloc.c
ce426f
@@ -104,8 +104,8 @@ null_test (void)
ce426f
 }
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   /* We are allocating blocks with `calloc' and check whether every
ce426f
      block is completely cleared.  We first try this for some fixed
ce426f
@@ -123,3 +123,6 @@ main (void)
ce426f
 
ce426f
   return 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/malloc/tst-malloc.c b/malloc/tst-malloc.c
ce426f
index a75ab1e..2685315 100644
ce426f
--- a/malloc/tst-malloc.c
ce426f
+++ b/malloc/tst-malloc.c
ce426f
@@ -29,8 +29,8 @@ merror (const char *msg)
ce426f
   printf ("Error: %s\n", msg);
ce426f
 }
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   void *p, *q;
ce426f
   int save;
ce426f
@@ -75,3 +75,6 @@ main (void)
ce426f
 
ce426f
   return errors != 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/malloc/tst-mallocstate.c b/malloc/tst-mallocstate.c
ce426f
index 69c4500..539539e 100644
ce426f
--- a/malloc/tst-mallocstate.c
ce426f
+++ b/malloc/tst-mallocstate.c
ce426f
@@ -29,8 +29,8 @@ merror (const char *msg)
ce426f
   printf ("Error: %s\n", msg);
ce426f
 }
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   void *p1, *p2;
ce426f
   void *save_state;
ce426f
@@ -79,3 +79,6 @@ main (void)
ce426f
  * c-basic-offset: 2
ce426f
  * End:
ce426f
  */
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/malloc/tst-mcheck.c b/malloc/tst-mcheck.c
ce426f
index 478ca8c..bd9ab0e 100644
ce426f
--- a/malloc/tst-mcheck.c
ce426f
+++ b/malloc/tst-mcheck.c
ce426f
@@ -29,8 +29,8 @@ merror (const char *msg)
ce426f
   printf ("Error: %s\n", msg);
ce426f
 }
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   void *p, *q;
ce426f
 
ce426f
@@ -88,3 +88,6 @@ main (void)
ce426f
 
ce426f
   return errors != 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/malloc/tst-mtrace.c b/malloc/tst-mtrace.c
ce426f
index 9b5151c..b2c0c2c 100644
ce426f
--- a/malloc/tst-mtrace.c
ce426f
+++ b/malloc/tst-mtrace.c
ce426f
@@ -30,8 +30,8 @@ static void print (const void *node, VISIT value, int level);
ce426f
 static FILE *fp;
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   void *root = NULL;
ce426f
   size_t linelen = 0;
ce426f
@@ -100,3 +100,6 @@ print (const void *node, VISIT value, int level)
ce426f
   if (value == postorder || value == leaf)
ce426f
     fprintf (fp, "%3d: %s", ++cnt, *(const char **) node);
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/malloc/tst-obstack.c b/malloc/tst-obstack.c
ce426f
index 769697f..ee1385d 100644
ce426f
--- a/malloc/tst-obstack.c
ce426f
+++ b/malloc/tst-obstack.c
ce426f
@@ -25,8 +25,8 @@ verbose_free (void *buf)
ce426f
   printf ("free (%p)\n", buf);
ce426f
 }
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int result = 0;
ce426f
   int align = 2;
ce426f
@@ -62,3 +62,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/math/atest-exp.c b/math/atest-exp.c
ce426f
index 3a538b2..6a551de 100644
ce426f
--- a/math/atest-exp.c
ce426f
+++ b/math/atest-exp.c
ce426f
@@ -102,8 +102,8 @@ mpn_bitsize(const mp_limb_t *SRC_PTR, mp_size_t SIZE)
ce426f
    return i * mpbpl + j;
ce426f
 }
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
    mp1 ex, x, xt, e2, e3;
ce426f
    int i;
ce426f
@@ -190,3 +190,6 @@ main (void)
ce426f
 
ce426f
    return failures == 0 ? 0 : 1;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/math/atest-exp2.c b/math/atest-exp2.c
ce426f
index 3442715..945bb7a 100644
ce426f
--- a/math/atest-exp2.c
ce426f
+++ b/math/atest-exp2.c
ce426f
@@ -144,8 +144,8 @@ mpn_bitsize(const mp_limb_t *SRC_PTR, mp_size_t SIZE)
ce426f
   return i * mpbpl + j;
ce426f
 }
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   mp1 ex, x, xt, e2, e3;
ce426f
   int i;
ce426f
@@ -227,3 +227,6 @@ main (void)
ce426f
 
ce426f
   return failures == 0 ? 0 : 1;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/math/atest-sincos.c b/math/atest-sincos.c
ce426f
index 5ad59b2..1f5e730 100644
ce426f
--- a/math/atest-sincos.c
ce426f
+++ b/math/atest-sincos.c
ce426f
@@ -141,8 +141,8 @@ mpn_bitsize (const mp_limb_t *SRC_PTR, mp_size_t SIZE)
ce426f
    return i * mpbpl + j;
ce426f
 }
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   mp1 si, co, x, ox, xt, s2, c2, s3, c3;
ce426f
   int i;
ce426f
@@ -277,3 +277,6 @@ main (void)
ce426f
 
ce426f
    return (sin_failures == 0 && cos_failures == 0) ? 0 : 1;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/math/test-matherr.c b/math/test-matherr.c
ce426f
index cd09a39..6983879 100644
ce426f
--- a/math/test-matherr.c
ce426f
+++ b/math/test-matherr.c
ce426f
@@ -12,10 +12,13 @@ matherr (struct exception *s)
ce426f
   return 1;
ce426f
 }
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   _LIB_VERSION = _SVID_;
ce426f
   acos (2.0);
ce426f
   return fail;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/math/test-misc.c b/math/test-misc.c
ce426f
index 3fd2bca..4801bfe 100644
ce426f
--- a/math/test-misc.c
ce426f
+++ b/math/test-misc.c
ce426f
@@ -25,8 +25,8 @@
ce426f
 #include <string.h>
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int result = 0;
ce426f
 
ce426f
@@ -1201,3 +1201,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/math/test-powl.c b/math/test-powl.c
ce426f
index fd2a1cb..66ef886 100644
ce426f
--- a/math/test-powl.c
ce426f
+++ b/math/test-powl.c
ce426f
@@ -21,8 +21,8 @@
ce426f
 #include <float.h>
ce426f
 #include <ieee754.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int result = 0;
ce426f
 
ce426f
@@ -48,3 +48,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/math/tst-definitions.c b/math/tst-definitions.c
ce426f
index 2501c8c..76a4125 100644
ce426f
--- a/math/tst-definitions.c
ce426f
+++ b/math/tst-definitions.c
ce426f
@@ -21,8 +21,8 @@
ce426f
 #include <stdio.h>
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int result = 0;
ce426f
 
ce426f
@@ -44,3 +44,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/misc/tst-dirname.c b/misc/tst-dirname.c
ce426f
index d8f33df..d6c05ad 100644
ce426f
--- a/misc/tst-dirname.c
ce426f
+++ b/misc/tst-dirname.c
ce426f
@@ -37,8 +37,8 @@ test (const char *input, const char *result)
ce426f
   return retval;
ce426f
 }
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int result = 0;
ce426f
 
ce426f
@@ -67,3 +67,6 @@ main (void)
ce426f
 
ce426f
   return result != 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/misc/tst-efgcvt.c b/misc/tst-efgcvt.c
ce426f
index 303042d..11427a0 100644
ce426f
--- a/misc/tst-efgcvt.c
ce426f
+++ b/misc/tst-efgcvt.c
ce426f
@@ -200,8 +200,8 @@ special (void)
ce426f
 }
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   test (ecvt_tests, ecvt, "ecvt");
ce426f
   test (fcvt_tests, fcvt, "fcvt");
ce426f
@@ -211,3 +211,6 @@ main (void)
ce426f
 
ce426f
   return error_count;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/misc/tst-fdset.c b/misc/tst-fdset.c
ce426f
index 78a34e9..ef93ac3 100644
ce426f
--- a/misc/tst-fdset.c
ce426f
+++ b/misc/tst-fdset.c
ce426f
@@ -20,8 +20,8 @@
ce426f
 #include <stdio.h>
ce426f
 #include <sys/types.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int retval = 0;
ce426f
   int i;
ce426f
@@ -62,3 +62,6 @@ main (void)
ce426f
 
ce426f
   return retval;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/misc/tst-hsearch.c b/misc/tst-hsearch.c
ce426f
index 6c19b22..d390f1d 100644
ce426f
--- a/misc/tst-hsearch.c
ce426f
+++ b/misc/tst-hsearch.c
ce426f
@@ -1,8 +1,8 @@
ce426f
 #include <search.h>
ce426f
 #include <stdio.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int a = 1;
ce426f
   int b = 2;
ce426f
@@ -29,3 +29,6 @@ main (void)
ce426f
 
ce426f
   return 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/misc/tst-mntent2.c b/misc/tst-mntent2.c
ce426f
index 6c25e01..e61d506 100644
ce426f
--- a/misc/tst-mntent2.c
ce426f
+++ b/misc/tst-mntent2.c
ce426f
@@ -3,8 +3,8 @@
ce426f
 #include <string.h>
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int result = 0;
ce426f
   struct mntent mef;
ce426f
@@ -39,3 +39,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/nptl/tst-sem7.c b/nptl/tst-sem7.c
ce426f
index d0e7f05..4fc5f1f 100644
ce426f
--- a/nptl/tst-sem7.c
ce426f
+++ b/nptl/tst-sem7.c
ce426f
@@ -31,8 +31,8 @@ remove_sem (int status, void *arg)
ce426f
 }
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   sem_t *s;
ce426f
   sem_t *s2;
ce426f
@@ -106,3 +106,6 @@ main (void)
ce426f
 
ce426f
   return 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/nptl/tst-sem8.c b/nptl/tst-sem8.c
ce426f
index 1aeb1e1..4d7197c 100644
ce426f
--- a/nptl/tst-sem8.c
ce426f
+++ b/nptl/tst-sem8.c
ce426f
@@ -31,8 +31,8 @@ remove_sem (int status, void *arg)
ce426f
 }
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   sem_t *s;
ce426f
   int i;
ce426f
@@ -71,3 +71,6 @@ main (void)
ce426f
 
ce426f
   return 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/nptl/tst-sem9.c b/nptl/tst-sem9.c
ce426f
index 9727486..b7d81a9 100644
ce426f
--- a/nptl/tst-sem9.c
ce426f
+++ b/nptl/tst-sem9.c
ce426f
@@ -31,8 +31,8 @@ remove_sem (int status, void *arg)
ce426f
 }
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   sem_t *s;
ce426f
   int i;
ce426f
@@ -78,3 +78,6 @@ main (void)
ce426f
 
ce426f
   return 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/nss/test-netdb.c b/nss/test-netdb.c
ce426f
index 1620b5b..384f32b 100644
ce426f
--- a/nss/test-netdb.c
ce426f
+++ b/nss/test-netdb.c
ce426f
@@ -356,8 +356,8 @@ setdb (const char *dbname)
ce426f
 }
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   /*
ce426f
     setdb ("db");
ce426f
@@ -376,3 +376,6 @@ main (void)
ce426f
 
ce426f
   return (error_count != 0);
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/posix/tst-fnmatch.c b/posix/tst-fnmatch.c
ce426f
index ff2674c..021734d 100644
ce426f
--- a/posix/tst-fnmatch.c
ce426f
+++ b/posix/tst-fnmatch.c
ce426f
@@ -33,8 +33,8 @@ static char *flag_output (int flags);
ce426f
 static char *escape (const char *str, size_t *reslenp, char **resbuf);
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   char *linebuf = NULL;
ce426f
   size_t linebuflen = 0;
ce426f
@@ -388,3 +388,6 @@ escape (const char *str, size_t *reslenp, char **resbufp)
ce426f
 
ce426f
   return resbuf;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/posix/tst-getlogin.c b/posix/tst-getlogin.c
ce426f
index 1393c3a..141a699 100644
ce426f
--- a/posix/tst-getlogin.c
ce426f
+++ b/posix/tst-getlogin.c
ce426f
@@ -19,8 +19,8 @@
ce426f
 #include <stdio.h>
ce426f
 #include <string.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   char *login;
ce426f
   int errors = 0;
ce426f
@@ -55,3 +55,6 @@ main (void)
ce426f
 
ce426f
   return errors != 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/posix/tst-gnuglob.c b/posix/tst-gnuglob.c
ce426f
index 1c72357..39b5b24 100644
ce426f
--- a/posix/tst-gnuglob.c
ce426f
+++ b/posix/tst-gnuglob.c
ce426f
@@ -379,8 +379,8 @@ test_result (const char *fmt, int flags, glob_t *gl, const char *str[])
ce426f
 }
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   glob_t gl;
ce426f
   int errval;
ce426f
@@ -497,3 +497,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/posix/tst-mmap.c b/posix/tst-mmap.c
ce426f
index c03acf5..5e52b49 100644
ce426f
--- a/posix/tst-mmap.c
ce426f
+++ b/posix/tst-mmap.c
ce426f
@@ -6,8 +6,8 @@
ce426f
 #include <sys/mman.h>
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int result = 0;
ce426f
   FILE *fp;
ce426f
@@ -195,3 +195,6 @@ main (void)
ce426f
   /* That's it.  */
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/resolv/tst-inet_ntop.c b/resolv/tst-inet_ntop.c
ce426f
index f968ec4..f0de063 100644
ce426f
--- a/resolv/tst-inet_ntop.c
ce426f
+++ b/resolv/tst-inet_ntop.c
ce426f
@@ -4,8 +4,8 @@
ce426f
 #include <stdio.h>
ce426f
 #include <string.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   struct in_addr addr4;
ce426f
   struct in6_addr addr6;
ce426f
@@ -109,3 +109,6 @@ main (void)
ce426f
   
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/rt/tst-timer.c b/rt/tst-timer.c
ce426f
index f35d3e7..87f6491 100644
ce426f
--- a/rt/tst-timer.c
ce426f
+++ b/rt/tst-timer.c
ce426f
@@ -20,8 +20,8 @@
ce426f
 
ce426f
 /* This file is only used if there is no other implementation and it should
ce426f
    means that there is no implementation of POSIX timers.  */
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
 #ifdef _POSIX_TIMERS
ce426f
   /* There should be a test.  */
ce426f
@@ -30,3 +30,6 @@ main (void)
ce426f
   return 0;
ce426f
 #endif
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/stdio-common/test-fseek.c b/stdio-common/test-fseek.c
ce426f
index fe57df6..8a7f1ae 100644
ce426f
--- a/stdio-common/test-fseek.c
ce426f
+++ b/stdio-common/test-fseek.c
ce426f
@@ -19,8 +19,8 @@
ce426f
 
ce426f
 #define TESTFILE "/tmp/test.dat"
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   FILE *fp;
ce426f
   int i, j;
ce426f
@@ -82,3 +82,6 @@ main (void)
ce426f
   puts ((i > 255) ? "Test succeeded." : "Test FAILED!");
ce426f
   return (i > 255) ? 0 : 1;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/stdio-common/test-popen.c b/stdio-common/test-popen.c
ce426f
index d36cd61..1f1c88a 100644
ce426f
--- a/stdio-common/test-popen.c
ce426f
+++ b/stdio-common/test-popen.c
ce426f
@@ -49,8 +49,8 @@ read_data (FILE *stream)
ce426f
     }
ce426f
 }
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   FILE *output, *input;
ce426f
   int wstatus, rstatus;
ce426f
@@ -100,3 +100,6 @@ main (void)
ce426f
   puts (wstatus | rstatus  ? "Test FAILED!" : "Test succeeded.");
ce426f
   return (wstatus | rstatus);
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/stdio-common/test-vfprintf.c b/stdio-common/test-vfprintf.c
ce426f
index a936c28..9cc56d7 100644
ce426f
--- a/stdio-common/test-vfprintf.c
ce426f
+++ b/stdio-common/test-vfprintf.c
ce426f
@@ -36,8 +36,8 @@ const char *locs[] =
ce426f
 
ce426f
 char large[50000];
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   char buf[25];
ce426f
   size_t i;
ce426f
@@ -124,3 +124,6 @@ main (void)
ce426f
 
ce426f
   return res;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/stdio-common/tst-cookie.c b/stdio-common/tst-cookie.c
ce426f
index dcdabf3..030e684 100644
ce426f
--- a/stdio-common/tst-cookie.c
ce426f
+++ b/stdio-common/tst-cookie.c
ce426f
@@ -63,8 +63,8 @@ cookieclose (void *cookie)
ce426f
 }
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   cookie_io_functions_t fcts;
ce426f
   char buf[1];
ce426f
@@ -90,3 +90,6 @@ main (void)
ce426f
 
ce426f
   return errors != 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/stdio-common/tst-fileno.c b/stdio-common/tst-fileno.c
ce426f
index a0c8853..753df9f 100644
ce426f
--- a/stdio-common/tst-fileno.c
ce426f
+++ b/stdio-common/tst-fileno.c
ce426f
@@ -28,10 +28,13 @@ check (const char *name, FILE *stream, int fd)
ce426f
   return sfd != fd;
ce426f
 }
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   return (check ("stdin", stdin, STDIN_FILENO) ||
ce426f
 	  check ("stdout", stdout, STDOUT_FILENO) ||
ce426f
 	  check ("stderr", stderr, STDERR_FILENO));
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/stdio-common/tst-gets.c b/stdio-common/tst-gets.c
ce426f
index 7f78fc1..052f1f9 100644
ce426f
--- a/stdio-common/tst-gets.c
ce426f
+++ b/stdio-common/tst-gets.c
ce426f
@@ -21,8 +21,8 @@
ce426f
 #include <string.h>
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   char buf[100];
ce426f
   int result = 0;
ce426f
@@ -61,3 +61,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/stdio-common/tst-obprintf.c b/stdio-common/tst-obprintf.c
ce426f
index 39e8fda..5151593 100644
ce426f
--- a/stdio-common/tst-obprintf.c
ce426f
+++ b/stdio-common/tst-obprintf.c
ce426f
@@ -4,8 +4,8 @@
ce426f
 #include <stdlib.h>
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   struct obstack ob;
ce426f
   int n;
ce426f
@@ -40,3 +40,6 @@ main (void)
ce426f
 
ce426f
   return 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/stdio-common/tst-perror.c b/stdio-common/tst-perror.c
ce426f
index b809c2f..416b120 100644
ce426f
--- a/stdio-common/tst-perror.c
ce426f
+++ b/stdio-common/tst-perror.c
ce426f
@@ -24,8 +24,8 @@
ce426f
 #define WC_EXP_LEN (sizeof (WC_EXP) - 1)
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int fd;
ce426f
   char fname[] = "/tmp/tst-perror.XXXXXX";
ce426f
@@ -152,3 +152,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/stdio-common/tst-sprintf.c b/stdio-common/tst-sprintf.c
ce426f
index c4e911f..2fe373f 100644
ce426f
--- a/stdio-common/tst-sprintf.c
ce426f
+++ b/stdio-common/tst-sprintf.c
ce426f
@@ -4,8 +4,8 @@
ce426f
 #include <string.h>
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   char buf[100];
ce426f
   int result = 0;
ce426f
@@ -73,3 +73,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/stdio-common/tst-sprintf2.c b/stdio-common/tst-sprintf2.c
ce426f
index 422278d..0ddf15b 100644
ce426f
--- a/stdio-common/tst-sprintf2.c
ce426f
+++ b/stdio-common/tst-sprintf2.c
ce426f
@@ -3,8 +3,8 @@
ce426f
 #include <stdio.h>
ce426f
 #include <string.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
 #if LDBL_MANT_DIG >= 106
ce426f
   volatile union { long double l; long long x[2]; } u, v;
ce426f
@@ -82,3 +82,6 @@ main (void)
ce426f
 #endif
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/stdio-common/tst-sprintf3.c b/stdio-common/tst-sprintf3.c
ce426f
index e54b23b..e927761 100644
ce426f
--- a/stdio-common/tst-sprintf3.c
ce426f
+++ b/stdio-common/tst-sprintf3.c
ce426f
@@ -22,8 +22,8 @@
ce426f
 #include <stdio.h>
ce426f
 #include <string.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
 #if LDBL_MANT_DIG >= 106
ce426f
   volatile union { long double l; long long x[2]; } u, v;
ce426f
@@ -88,3 +88,6 @@ main (void)
ce426f
 #endif
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/stdio-common/tst-swprintf.c b/stdio-common/tst-swprintf.c
ce426f
index e65234b..ce62c6b 100644
ce426f
--- a/stdio-common/tst-swprintf.c
ce426f
+++ b/stdio-common/tst-swprintf.c
ce426f
@@ -12,8 +12,8 @@
ce426f
 
ce426f
 const char input[] = "\x8e\xa1g\x8e\xa2h\x8e\xa3i\x8e\xa4j";
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   wchar_t buf[1000];
ce426f
 #define nbuf (sizeof (buf) / sizeof (buf[0]))
ce426f
@@ -54,3 +54,6 @@ swprintf (.., .., L\"%ls\", \"%ls\") produced \"%ls\", not \"%ls\"\n",	      \
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/stdio-common/tst-tmpnam.c b/stdio-common/tst-tmpnam.c
ce426f
index a3bd9fb..3b97064 100644
ce426f
--- a/stdio-common/tst-tmpnam.c
ce426f
+++ b/stdio-common/tst-tmpnam.c
ce426f
@@ -19,8 +19,8 @@
ce426f
 #include <stdlib.h>
ce426f
 #include <string.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   const char *name;
ce426f
   int retval = 0;
ce426f
@@ -48,3 +48,6 @@ main (void)
ce426f
 
ce426f
   return retval;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/stdio-common/tst-unbputc.c b/stdio-common/tst-unbputc.c
ce426f
index bbd8622..7200a82 100644
ce426f
--- a/stdio-common/tst-unbputc.c
ce426f
+++ b/stdio-common/tst-unbputc.c
ce426f
@@ -1,11 +1,14 @@
ce426f
 #include <stdio.h>
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   putc ('1', stderr);
ce426f
   putc ('2', stderr);
ce426f
 
ce426f
   return 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/stdio-common/tst-wc-printf.c b/stdio-common/tst-wc-printf.c
ce426f
index abbeeb5..2a2acb5 100644
ce426f
--- a/stdio-common/tst-wc-printf.c
ce426f
+++ b/stdio-common/tst-wc-printf.c
ce426f
@@ -4,8 +4,8 @@
ce426f
 #include <string.h>
ce426f
 #include <wctype.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   wchar_t tmp[3];
ce426f
   tmp[0] = '8';
ce426f
@@ -20,3 +20,6 @@ main (void)
ce426f
 
ce426f
   return 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/stdlib/tst-environ.c b/stdlib/tst-environ.c
ce426f
index 3316d7e..b1de2f9 100644
ce426f
--- a/stdlib/tst-environ.c
ce426f
+++ b/stdlib/tst-environ.c
ce426f
@@ -25,8 +25,8 @@
ce426f
 
ce426f
 char putenv_val[100] = VAR "=some longer value";
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int result = 0;
ce426f
   const char *valp;
ce426f
@@ -219,3 +219,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/stdlib/tst-fmtmsg.c b/stdlib/tst-fmtmsg.c
ce426f
index c3748d6..b7948c5 100644
ce426f
--- a/stdlib/tst-fmtmsg.c
ce426f
+++ b/stdlib/tst-fmtmsg.c
ce426f
@@ -7,8 +7,8 @@
ce426f
 
ce426f
 #define MM_TEST 10
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int result = 0;
ce426f
 
ce426f
@@ -80,3 +80,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/stdlib/tst-limits.c b/stdlib/tst-limits.c
ce426f
index 265b9db..6e51dca 100644
ce426f
--- a/stdlib/tst-limits.c
ce426f
+++ b/stdlib/tst-limits.c
ce426f
@@ -16,8 +16,8 @@ bitval (int bits)
ce426f
 }
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int result = 0;
ce426f
 
ce426f
@@ -67,3 +67,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/stdlib/tst-rand48-2.c b/stdlib/tst-rand48-2.c
ce426f
index 3079b98..8b8fef4 100644
ce426f
--- a/stdlib/tst-rand48-2.c
ce426f
+++ b/stdlib/tst-rand48-2.c
ce426f
@@ -3,8 +3,8 @@
ce426f
 #include <stdlib.h>
ce426f
 #include <time.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   time_t t = time (NULL);
ce426f
   int i, ret = 0;
ce426f
@@ -111,3 +111,6 @@ main (void)
ce426f
 
ce426f
   return ret;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/stdlib/tst-rand48.c b/stdlib/tst-rand48.c
ce426f
index 52e1b96..973c62e 100644
ce426f
--- a/stdlib/tst-rand48.c
ce426f
+++ b/stdlib/tst-rand48.c
ce426f
@@ -8,8 +8,8 @@
ce426f
 #endif
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   unsigned short int xs[3] = { 0x0001, 0x0012, 0x0123 };
ce426f
   unsigned short int lxs[7];
ce426f
@@ -388,3 +388,6 @@ drand48() and erand48 in lines %d and %d produce different results\n",
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/stdlib/tst-random.c b/stdlib/tst-random.c
ce426f
index 47195d6..8fe0993 100644
ce426f
--- a/stdlib/tst-random.c
ce426f
+++ b/stdlib/tst-random.c
ce426f
@@ -46,8 +46,8 @@ const unsigned int seed[3] = { 0x12344321U, 0xEE11DD22U, 0xFEDCBA98 };
ce426f
 
ce426f
 void fail (const char *msg, int s, int i) __attribute__ ((__noreturn__));
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   long int rnd[nseq][nrnd];	/* pseudorandom numbers */
ce426f
   char* state[nseq];		/* state for PRNG */
ce426f
@@ -117,3 +117,6 @@ fail (const char *msg, int s, int i)
ce426f
   printf ("%s (seq %d, pos %d).\n", msg, s, i);
ce426f
   exit (1);
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/stdlib/tst-random2.c b/stdlib/tst-random2.c
ce426f
index 0553b62..da840f3 100644
ce426f
--- a/stdlib/tst-random2.c
ce426f
+++ b/stdlib/tst-random2.c
ce426f
@@ -20,8 +20,8 @@
ce426f
 #include <stdio.h>
ce426f
 #include <stdlib.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int pass;
ce426f
   int ret = 0;
ce426f
@@ -56,3 +56,6 @@ main (void)
ce426f
     }
ce426f
   return ret;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/stdlib/tst-strtol.c b/stdlib/tst-strtol.c
ce426f
index eebd8f7..448102a 100644
ce426f
--- a/stdlib/tst-strtol.c
ce426f
+++ b/stdlib/tst-strtol.c
ce426f
@@ -534,8 +534,8 @@ static const struct ltest tests[] =
ce426f
 /* Prototypes for local functions.  */
ce426f
 static void expand (char *dst, int c);
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   register const struct ltest *lt;
ce426f
   char *ep;
ce426f
@@ -623,3 +623,6 @@ expand (dst, c)
ce426f
   else
ce426f
     (void) sprintf (dst, "%#.3o", (unsigned int) c);
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/stdlib/tst-strtoll.c b/stdlib/tst-strtoll.c
ce426f
index 0c77254..93f1a56 100644
ce426f
--- a/stdlib/tst-strtoll.c
ce426f
+++ b/stdlib/tst-strtoll.c
ce426f
@@ -309,8 +309,8 @@ static const struct ltest tests[] =
ce426f
 /* Prototypes for local functions.  */
ce426f
 static void expand (char *dst, int c);
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   register const struct ltest *lt;
ce426f
   char *ep;
ce426f
@@ -398,3 +398,6 @@ expand (dst, c)
ce426f
   else
ce426f
     (void) sprintf (dst, "%#.3o", (unsigned int) c);
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/stdlib/tst-xpg-basename.c b/stdlib/tst-xpg-basename.c
ce426f
index 61e2e4b..facc783 100644
ce426f
--- a/stdlib/tst-xpg-basename.c
ce426f
+++ b/stdlib/tst-xpg-basename.c
ce426f
@@ -37,8 +37,8 @@ static struct
ce426f
 };
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   size_t i = 0;
ce426f
   int errors = 0;
ce426f
@@ -64,3 +64,6 @@ main (void)
ce426f
 
ce426f
   return errors;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/string/test-ffs.c b/string/test-ffs.c
ce426f
index 7ac1dd6..a64a1cc 100644
ce426f
--- a/string/test-ffs.c
ce426f
+++ b/string/test-ffs.c
ce426f
@@ -21,8 +21,8 @@
ce426f
 #include <stdio.h>
ce426f
 #include <string.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int failures = 0;
ce426f
   int i;
ce426f
@@ -61,3 +61,6 @@ main (void)
ce426f
 
ce426f
   return failures;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/string/tst-bswap.c b/string/tst-bswap.c
ce426f
index cca704c..6c1c911 100644
ce426f
--- a/string/tst-bswap.c
ce426f
+++ b/string/tst-bswap.c
ce426f
@@ -21,8 +21,8 @@
ce426f
 
ce426f
 extern unsigned long long int wash (unsigned long long int a);
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int result = 0;
ce426f
 
ce426f
@@ -71,3 +71,6 @@ wash (unsigned long long int a)
ce426f
      regards the argument to the bswap_*() functions as constant.  */
ce426f
   return a + 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/string/tst-inlcall.c b/string/tst-inlcall.c
ce426f
index 32d8863..0f8b1bd 100644
ce426f
--- a/string/tst-inlcall.c
ce426f
+++ b/string/tst-inlcall.c
ce426f
@@ -31,8 +31,8 @@
ce426f
 #include <fcntl.h>
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int status;
ce426f
   int errors = 0;
ce426f
@@ -80,3 +80,6 @@ main (void)
ce426f
     }
ce426f
   return status;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/string/tst-strtok.c b/string/tst-strtok.c
ce426f
index 7e34aee..6fbef9f 100644
ce426f
--- a/string/tst-strtok.c
ce426f
+++ b/string/tst-strtok.c
ce426f
@@ -2,8 +2,8 @@
ce426f
 #include <stdio.h>
ce426f
 #include <string.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   char buf[1] = { 0 };
ce426f
   int result = 0;
ce426f
@@ -21,3 +21,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/string/tst-strxfrm.c b/string/tst-strxfrm.c
ce426f
index 2ae2e29..f48cfc0 100644
ce426f
--- a/string/tst-strxfrm.c
ce426f
+++ b/string/tst-strxfrm.c
ce426f
@@ -58,8 +58,8 @@ test (const char *locale)
ce426f
 }
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int result = 0;
ce426f
 
ce426f
@@ -69,3 +69,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/sysdeps/x86_64/tst-audit10.c b/sysdeps/x86_64/tst-audit10.c
ce426f
index 24c9696..8d6721a 100644
ce426f
--- a/sysdeps/x86_64/tst-audit10.c
ce426f
+++ b/sysdeps/x86_64/tst-audit10.c
ce426f
@@ -45,8 +45,8 @@ avx512_enabled (void)
ce426f
 
ce426f
 extern __m512i audit_test (__m512i, __m512i, __m512i, __m512i,
ce426f
 			   __m512i, __m512i, __m512i, __m512i);
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   /* Run AVX512 test only if AVX512 is supported.  */
ce426f
   if (avx512_enabled ())
ce426f
@@ -62,9 +62,12 @@ main (void)
ce426f
   return 0;
ce426f
 }
ce426f
 #else
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   return 0;
ce426f
 }
ce426f
 #endif
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../../test-skeleton.c"
ce426f
diff --git a/elf/tst-audit3.c b/elf/tst-audit3.c
ce426f
index d00db99..0602aa2 100644
ce426f
--- a/elf/tst-audit3.c
ce426f
+++ b/elf/tst-audit3.c
ce426f
@@ -7,8 +7,8 @@
ce426f
 
ce426f
 extern __m128i audit_test (__m128i, __m128i, __m128i, __m128i,
ce426f
 			   __m128i, __m128i, __m128i, __m128i);
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   __m128i xmm = _mm_setzero_si128 ();
ce426f
   __m128i ret = audit_test (xmm, xmm, xmm, xmm, xmm, xmm, xmm, xmm);
ce426f
@@ -18,3 +18,6 @@ main (void)
ce426f
 
ce426f
   return 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../../test-skeleton.c"
ce426f
diff --git a/elf/tst-audit4.c b/elf/tst-audit4.c
ce426f
index c4f1d5b..44d5123 100644
ce426f
--- a/elf/tst-audit4.c
ce426f
+++ b/elf/tst-audit4.c
ce426f
@@ -25,8 +25,8 @@ avx_enabled (void)
ce426f
 
ce426f
 extern __m256i audit_test (__m256i, __m256i, __m256i, __m256i,
ce426f
 			   __m256i, __m256i, __m256i, __m256i);
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   /* Run AVX test only if AVX is supported.  */
ce426f
   if (avx_enabled ())
ce426f
@@ -41,9 +41,12 @@ main (void)
ce426f
   return 0;
ce426f
 }
ce426f
 #else
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   return 0;
ce426f
 }
ce426f
 #endif
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../../test-skeleton.c"
ce426f
diff --git a/elf/tst-audit5.c b/elf/tst-audit5.c
ce426f
index 0094fee..225b4c8 100644
ce426f
--- a/elf/tst-audit5.c
ce426f
+++ b/elf/tst-audit5.c
ce426f
@@ -7,8 +7,8 @@
ce426f
 
ce426f
 extern __m128i audit_test (__m128i, __m128i, __m128i, __m128i,
ce426f
 			   __m128i, __m128i, __m128i, __m128i);
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   __m128i xmm = _mm_setzero_si128 ();
ce426f
   __m128i ret = audit_test (xmm, xmm, xmm, xmm, xmm, xmm, xmm, xmm);
ce426f
@@ -19,3 +19,6 @@ main (void)
ce426f
 
ce426f
   return 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../../test-skeleton.c"
ce426f
diff --git a/time/tst-ftime_l.c b/time/tst-ftime_l.c
ce426f
index fc3d78d..6690efe 100644
ce426f
--- a/time/tst-ftime_l.c
ce426f
+++ b/time/tst-ftime_l.c
ce426f
@@ -6,8 +6,8 @@
ce426f
 #include <wchar.h>
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   locale_t l;
ce426f
   locale_t old;
ce426f
@@ -124,3 +124,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/time/tst-getdate.c b/time/tst-getdate.c
ce426f
index fd87923..b3377ee 100644
ce426f
--- a/time/tst-getdate.c
ce426f
+++ b/time/tst-getdate.c
ce426f
@@ -76,8 +76,8 @@ report_date_error (int err)
ce426f
 }
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int errors = 0;
ce426f
   size_t i;
ce426f
@@ -121,3 +121,6 @@ main (void)
ce426f
     printf ("No errors found.\n");
ce426f
   return errors != 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/time/tst-mktime.c b/time/tst-mktime.c
ce426f
index 416a856..c147360 100644
ce426f
--- a/time/tst-mktime.c
ce426f
+++ b/time/tst-mktime.c
ce426f
@@ -3,8 +3,8 @@
ce426f
 #include <string.h>
ce426f
 #include <time.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   struct tm time_str, *tm;
ce426f
   time_t t;
ce426f
@@ -68,3 +68,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/time/tst-mktime3.c b/time/tst-mktime3.c
ce426f
index 60d0e0b..c738e53 100644
ce426f
--- a/time/tst-mktime3.c
ce426f
+++ b/time/tst-mktime3.c
ce426f
@@ -17,8 +17,8 @@ struct tm expected[] =
ce426f
   { .tm_sec = 5, .tm_mday = 1, .tm_year = 102, .tm_wday = 2 }
ce426f
 };
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   setenv ("TZ", "UTC", 1);
ce426f
   int i;
ce426f
@@ -48,3 +48,6 @@ main (void)
ce426f
     }
ce426f
   return 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/time/tst-posixtz.c b/time/tst-posixtz.c
ce426f
index 019d92a..c1ea267 100644
ce426f
--- a/time/tst-posixtz.c
ce426f
+++ b/time/tst-posixtz.c
ce426f
@@ -28,8 +28,8 @@ struct
ce426f
     "1999/02/25 15:18:12 dst=0 zone=EST" },
ce426f
 };
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int result = 0;
ce426f
   size_t cnt;
ce426f
@@ -116,3 +116,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/time/tst-strptime2.c b/time/tst-strptime2.c
ce426f
index 73552bb..bcd6cc8 100644
ce426f
--- a/time/tst-strptime2.c
ce426f
+++ b/time/tst-strptime2.c
ce426f
@@ -26,8 +26,8 @@ static const struct
ce426f
 #define ntests (sizeof (tests) / sizeof (tests[0]))
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int result = 0;
ce426f
 
ce426f
@@ -57,3 +57,6 @@ main (void)
ce426f
 
ce426f
   return 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/time/tst-strptime3.c b/time/tst-strptime3.c
ce426f
index 9a8c648..75b57c1 100644
ce426f
--- a/time/tst-strptime3.c
ce426f
+++ b/time/tst-strptime3.c
ce426f
@@ -4,8 +4,8 @@
ce426f
 #include <time.h>
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int result = 0;
ce426f
   struct tm tm;
ce426f
@@ -53,3 +53,6 @@ main (void)
ce426f
 
ce426f
   return 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/wcsmbs/tst-btowc.c b/wcsmbs/tst-btowc.c
ce426f
index d793622..dc34f2b 100644
ce426f
--- a/wcsmbs/tst-btowc.c
ce426f
+++ b/wcsmbs/tst-btowc.c
ce426f
@@ -74,8 +74,8 @@ eof_test (void)
ce426f
 
ce426f
 
ce426f
 /* Test the btowc() function for a few locales with known character sets.  */
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int result = 0;
ce426f
 
ce426f
@@ -172,3 +172,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/wcsmbs/tst-mbrtowc.c b/wcsmbs/tst-mbrtowc.c
ce426f
index 3e1eb72..a30b619 100644
ce426f
--- a/wcsmbs/tst-mbrtowc.c
ce426f
+++ b/wcsmbs/tst-mbrtowc.c
ce426f
@@ -151,8 +151,8 @@ utf8_test (void)
ce426f
 }
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int result = 0;
ce426f
 
ce426f
@@ -230,3 +230,6 @@ check_ascii (const char *locname)
ce426f
 
ce426f
   return res != 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/wcsmbs/tst-mbsrtowcs.c b/wcsmbs/tst-mbsrtowcs.c
ce426f
index 8d7e2cb..405534d 100644
ce426f
--- a/wcsmbs/tst-mbsrtowcs.c
ce426f
+++ b/wcsmbs/tst-mbsrtowcs.c
ce426f
@@ -21,8 +21,8 @@
ce426f
 #include <string.h>
ce426f
 #include <wchar.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   const unsigned char buf[] = { 'a', 'b', '\0', 'c', 'd', '\0', 'e' };
ce426f
   wchar_t out[sizeof (buf)];
ce426f
@@ -62,3 +62,6 @@ main (void)
ce426f
     }
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/wcsmbs/tst-wchar-h.c b/wcsmbs/tst-wchar-h.c
ce426f
index 4cf2dd0..fd2ad56 100644
ce426f
--- a/wcsmbs/tst-wchar-h.c
ce426f
+++ b/wcsmbs/tst-wchar-h.c
ce426f
@@ -1,9 +1,12 @@
ce426f
 #include <stdlib.h>
ce426f
 #include <wchar.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   mbstate_t x;
ce426f
   return sizeof (x) - sizeof (mbstate_t);
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/wcsmbs/tst-wcpncpy.c b/wcsmbs/tst-wcpncpy.c
ce426f
index 74765e7..4cf4aec 100644
ce426f
--- a/wcsmbs/tst-wcpncpy.c
ce426f
+++ b/wcsmbs/tst-wcpncpy.c
ce426f
@@ -20,8 +20,8 @@
ce426f
 #include <wchar.h>
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int result = 0;
ce426f
 
ce426f
@@ -74,3 +74,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/wcsmbs/tst-wcrtomb.c b/wcsmbs/tst-wcrtomb.c
ce426f
index 3f052f3..cad343e 100644
ce426f
--- a/wcsmbs/tst-wcrtomb.c
ce426f
+++ b/wcsmbs/tst-wcrtomb.c
ce426f
@@ -26,8 +26,8 @@
ce426f
 static int check_ascii (const char *locname);
ce426f
 
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int result = 0;
ce426f
 
ce426f
@@ -92,3 +92,6 @@ check_ascii (const char *locname)
ce426f
 
ce426f
   return res != 0;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/wcsmbs/tst-wcsnlen.c b/wcsmbs/tst-wcsnlen.c
ce426f
index 60e64ad..8d4b8b5 100644
ce426f
--- a/wcsmbs/tst-wcsnlen.c
ce426f
+++ b/wcsmbs/tst-wcsnlen.c
ce426f
@@ -27,8 +27,8 @@
ce426f
       printf ("wcsnlen (L\"%s\", %d) = %d, not %d\n", Str, Max, n, Exp);      \
ce426f
     }
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int result = 0;
ce426f
   int n;
ce426f
@@ -48,3 +48,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"
ce426f
diff --git a/wcsmbs/tst-wcstof.c b/wcsmbs/tst-wcstof.c
ce426f
index 197cb5c..576a58c 100644
ce426f
--- a/wcsmbs/tst-wcstof.c
ce426f
+++ b/wcsmbs/tst-wcstof.c
ce426f
@@ -4,8 +4,8 @@
ce426f
 #include <string.h>
ce426f
 #include <wctype.h>
ce426f
 
ce426f
-int
ce426f
-main (void)
ce426f
+static int
ce426f
+do_test (void)
ce426f
 {
ce426f
   int result = 0;
ce426f
   char buf[100];
ce426f
@@ -21,3 +21,6 @@ main (void)
ce426f
 
ce426f
   return result;
ce426f
 }
ce426f
+
ce426f
+#define TEST_FUNCTION do_test ()
ce426f
+#include "../test-skeleton.c"