Blame SOURCES/glibc-rh1298354.patch

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