]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update string tests to use the support test driver.
authorWainer dos Santos Moschetta <wainersm@linux.vnet.ibm.com>
Thu, 23 Mar 2017 14:32:17 +0000 (11:32 -0300)
committerTulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
Thu, 23 Mar 2017 14:32:29 +0000 (11:32 -0300)
Replaced all imports of test-skeleton.c with support/test-driver.c.

In some cases it was needed to adjust do_test to return int
instead of static int since that is the method's signature expected by
test-driver.c.

Checked on x86_64.

* string/test-string.h (TEST_FUNCTION): Use test_main instead of
test_main ().
(CMDLINE_PROCESS): Use function instead of defined macro.
* debug/test-strcpy_chk.c: Import support/test-driver.c and also
<suppport/support.h> to use set_fortify_handler().
* string/bug-envz1.c: Import support/test-driver.c instead of
test-skeleton.c.
* string/bug-strcoll2.c: Likewise.
* string/bug-strtok1.c: Likewise.
* string/stratcliff.c: Likewise.
* string/test-ffs.c: Likewise.
* string/test-memccpy.c: Likewise.
* string/test-memchr.c: Likewise.
* string/test-memcmp.c: Likewise.
* string/test-memcpy.c: Likewise.
* string/test-memmem.c: Likewise.
* string/test-memmove.c: Likewise.
* string/test-memrchr.c: Likewise.
* string/test-memset.c: Likewise.
* string/test-rawmemchr.c: Likewise.
* string/test-strcasecmp.c: Likewise.
* string/test-strcasestr.c: Likewise.
* string/test-strcat.c: Likewise.
* string/test-strchr.c: Likewise.
* string/test-strcmp.c: Likewise.
* string/test-strcpy.c: Likewise.
* string/test-string.h: Likewise.
* string/test-strlen.c: Likewise.
* string/test-strncasecmp.c: Likewise.
* string/test-strncat.c: Likewise.
* string/test-strncmp.c: Likewise.
* string/test-strncpy.c: Likewise.
* string/test-strnlen.c: Likewise.
* string/test-strpbrk.c: Likewise.
* string/test-strrchr.c: Likewise.
* string/test-strspn.c: Likewise.
* string/test-strstr.c: Likewise.
* string/tst-bswap.c: Likewise.
* string/tst-cmp.c: Likewise.
* string/tst-endian.c: Likewise.
* string/tst-inlcall.c: Likewise.
* string/tst-strcoll-overflow.c: Likewise.
* string/tst-strfry.c: Likewise.
* string/tst-strlen.c: Likewise.
* string/tst-strtok.c: Likewise.
* string/tst-strtok_r.c: Likewise.
* string/tst-strxfrm.c: Likewise.
* string/tst-strxfrm2.c: Likewise.
* string/tst-svc.c: Likewise.
* string/tst-svc2.c: Likewise.

46 files changed:
ChangeLog
debug/test-strcpy_chk.c
string/bug-envz1.c
string/bug-strcoll2.c
string/bug-strtok1.c
string/stratcliff.c
string/test-ffs.c
string/test-memccpy.c
string/test-memchr.c
string/test-memcmp.c
string/test-memcpy.c
string/test-memmem.c
string/test-memmove.c
string/test-memrchr.c
string/test-memset.c
string/test-rawmemchr.c
string/test-strcasecmp.c
string/test-strcasestr.c
string/test-strcat.c
string/test-strchr.c
string/test-strcmp.c
string/test-strcpy.c
string/test-string.h
string/test-strlen.c
string/test-strncasecmp.c
string/test-strncat.c
string/test-strncmp.c
string/test-strncpy.c
string/test-strnlen.c
string/test-strpbrk.c
string/test-strrchr.c
string/test-strspn.c
string/test-strstr.c
string/tst-bswap.c
string/tst-cmp.c
string/tst-endian.c
string/tst-inlcall.c
string/tst-strcoll-overflow.c
string/tst-strfry.c
string/tst-strlen.c
string/tst-strtok.c
string/tst-strtok_r.c
string/tst-strxfrm.c
string/tst-strxfrm2.c
string/tst-svc.c
string/tst-svc2.c

index 7809c3dc2bb734ab52c26dc1d651367fa1aa5289..5769bf5512162b50b28af1f4247b8c91167613a9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,56 @@
+2017-03-23  Wainer dos Santos Moschetta  <wainersm@linux.vnet.ibm.com>
+
+       * string/test-string.h (TEST_FUNCTION): Use test_main instead of
+       test_main ().
+       (CMDLINE_PROCESS): Use function instead of defined macro.
+       * debug/test-strcpy_chk.c: Import support/test-driver.c and also
+       <suppport/support.h> to use set_fortify_handler().
+       * string/bug-envz1.c: Import support/test-driver.c instead of
+       test-skeleton.c.
+       * string/bug-strcoll2.c: Likewise.
+       * string/bug-strtok1.c: Likewise.
+       * string/stratcliff.c: Likewise.
+       * string/test-ffs.c: Likewise.
+       * string/test-memccpy.c: Likewise.
+       * string/test-memchr.c: Likewise.
+       * string/test-memcmp.c: Likewise.
+       * string/test-memcpy.c: Likewise.
+       * string/test-memmem.c: Likewise.
+       * string/test-memmove.c: Likewise.
+       * string/test-memrchr.c: Likewise.
+       * string/test-memset.c: Likewise.
+       * string/test-rawmemchr.c: Likewise.
+       * string/test-strcasecmp.c: Likewise.
+       * string/test-strcasestr.c: Likewise.
+       * string/test-strcat.c: Likewise.
+       * string/test-strchr.c: Likewise.
+       * string/test-strcmp.c: Likewise.
+       * string/test-strcpy.c: Likewise.
+       * string/test-string.h: Likewise.
+       * string/test-strlen.c: Likewise.
+       * string/test-strncasecmp.c: Likewise.
+       * string/test-strncat.c: Likewise.
+       * string/test-strncmp.c: Likewise.
+       * string/test-strncpy.c: Likewise.
+       * string/test-strnlen.c: Likewise.
+       * string/test-strpbrk.c: Likewise.
+       * string/test-strrchr.c: Likewise.
+       * string/test-strspn.c: Likewise.
+       * string/test-strstr.c: Likewise.
+       * string/tst-bswap.c: Likewise.
+       * string/tst-cmp.c: Likewise.
+       * string/tst-endian.c: Likewise.
+       * string/tst-inlcall.c: Likewise.
+       * string/tst-strcoll-overflow.c: Likewise.
+       * string/tst-strfry.c: Likewise.
+       * string/tst-strlen.c: Likewise.
+       * string/tst-strtok.c: Likewise.
+       * string/tst-strtok_r.c: Likewise.
+       * string/tst-strxfrm.c: Likewise.
+       * string/tst-strxfrm2.c: Likewise.
+       * string/tst-svc.c: Likewise.
+       * string/tst-svc2.c: Likewise.
+
 2017-03-22  Zack Weinberg  <zackw@panix.com>
 
        * stdio-common/bug25.c: Include stdlib.h.
index 6bb0fc0e871dd4dcea1bf8d49819891d88d0414b..8b729bd6ba1fe9941ff69895fe2756e3c68c5ab1 100644 (file)
@@ -55,8 +55,9 @@ simple_strcpy_chk (char *dst, const char *src, size_t len)
 #include <signal.h>
 
 static int test_main (void);
-#define TEST_FUNCTION test_main ()
-#include "../test-skeleton.c"
+#define TEST_FUNCTION test_main
+#include <support/test-driver.c>
+#include <support/support.h>
 
 volatile int chk_fail_ok;
 jmp_buf chk_fail_buf;
index e8a60972b5f7af3ea5215c5f55d449da4a224c68..931a0559fe547e99ef61a870a8d2429e49082c54 100644 (file)
@@ -25,7 +25,7 @@ static const struct
 #define nstrs (sizeof (strs) / sizeof (strs[0]))
 
 
-static int
+int
 do_test (void)
 {
 
@@ -72,5 +72,4 @@ do_test (void)
   return result;
 }
 
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index 8d4fed52317b0282f2a107df73dbbe6e7cd9ee75..ff33007df6e34f19c2930642769572acfa5817a4 100644 (file)
@@ -79,7 +79,7 @@ test_da_DK (void)
     }
 }
 
-static int
+int
 do_test (void)
 {
   int err = 0;
@@ -88,5 +88,4 @@ do_test (void)
   return err;
 }
 
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index da30acf2e6308fd4268c59209e4193baabaa4d7d..a47b2f3531f887c53e963769e307e7d90fafb8d4 100644 (file)
@@ -2,7 +2,7 @@
 #include <string.h>
 #include <stdio.h>
 
-static int
+int
 do_test (void)
 {
   const char str[] = "axaaba";
@@ -41,5 +41,4 @@ do_test (void)
   return result;
 }
 
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index e6726448886882ba9dd06775ae7284fe75d8d448..e28b0c5058949a0ff8ebc6d1c0cee3ca825f9f41 100644 (file)
@@ -55,7 +55,7 @@
 #define STRINGIFY2(s) #s
 
 
-static int
+int
 do_test (void)
 {
   int size = sysconf (_SC_PAGESIZE);
@@ -558,5 +558,4 @@ memccpy copied too much for outer = %d, middle = %d, inner = %d\n",
   return result;
 }
 
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index 8c8ce2a82929c6636272dd732d840ed05ab29e5e..11b6ea838bdc6d4514561f32b5aba4bf8f7c35e1 100644 (file)
@@ -21,7 +21,7 @@
 #include <stdio.h>
 #include <string.h>
 
-static int
+int
 do_test (void)
 {
   int failures = 0;
@@ -62,5 +62,4 @@ do_test (void)
   return failures;
 }
 
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index 1b7e177770481bce159ddc8c995b654e01658bee..7bd67a61e7e7ab75f450d7b7a9d3e44c8814b0d7 100644 (file)
@@ -266,4 +266,4 @@ test_main (void)
   return ret;
 }
 
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index d64d10cb0e0977f1579c7defa9e36545b34e3576..2403c9242b070d0772daa613c9457197bf6f2a65 100644 (file)
@@ -214,4 +214,4 @@ test_main (void)
   return ret;
 }
 
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index 0e3cc9fa217178bf3923705635c2482dcc11b4ba..a7969edaea0b36811c31b118815f4c55144d5e83 100644 (file)
@@ -521,4 +521,5 @@ test_main (void)
   do_random_tests ();
   return ret;
 }
-#include "../test-skeleton.c"
+
+#include <support/test-driver.c>
index 882c603ccfe3736ff0eb391350eb8582fe6a10c7..49f0a760471a9b0ce688fe00a9e3df7406b9635d 100644 (file)
@@ -256,4 +256,4 @@ test_main (void)
   return ret;
 }
 
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index f49f6e2340e74cb1b6a62766b99ed350dd2cad18..82fd93ccdef606b4967a62be448bff17cb0336e8 100644 (file)
@@ -181,4 +181,4 @@ test_main (void)
   return ret;
 }
 
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index d9f332f4b0d80670dd8c1f5a8c9a7c9f8f8281c8..51f79f6eb4a8f3bcef4a0857472ee569daa8c599 100644 (file)
@@ -287,4 +287,4 @@ test_main (void)
   return ret;
 }
 
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index b313175860eb764500b5963dae4499d353617ed0..bfc9920dcce0164130aa4641beb8063e52095a3b 100644 (file)
@@ -166,4 +166,4 @@ test_main (void)
   return ret;
 }
 
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index cf73651dd1ff74378fd8c08c3dfd46c2051123d6..ca1bfe1e3b028dc22ef7eeca74f7826254aa9661 100644 (file)
@@ -264,4 +264,4 @@ test_main (void)
   return ret;
 }
 
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index 15cdedd5fdc6209183c42b452c283a220f5c1441..2a53e710261be3403ebd089e24594efbbf8b3986 100644 (file)
@@ -162,4 +162,4 @@ test_main (void)
   return ret;
 }
 
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index 28b32e27da5c02934b59b0690b20fdcdd5394e11..9c333f00720b4c1a16cd5b8e676aae91011df638 100644 (file)
@@ -267,4 +267,4 @@ test_main (void)
   return ret;
 }
 
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index bf4fc5e250d2ea819e35599bcfec20d0a43d5c0c..abb391673272d9a09db6a4013da77ce7a9ec4ef8 100644 (file)
@@ -191,4 +191,4 @@ test_main (void)
   return ret;
 }
 
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index 26e37fa523e12cadcf5212eaa1cb5fdeda1a20ac..01d180eb50cd49a3ea8ede344c781f4177653bbf 100644 (file)
@@ -269,4 +269,4 @@ test_main (void)
   return ret;
 }
 
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index dba149ed3c20fea0dd2ca771d628e2cc8b07e2c0..de9a274f7bff781cce7f226386e3190194b0c791 100644 (file)
@@ -293,4 +293,4 @@ test_main (void)
   return ret;
 }
 
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index 7b546d26e883bf9f572d56d91ac95cee21200e02..f7af219149791dd1a75e95d0254f9d248eb38d7b 100644 (file)
@@ -406,4 +406,4 @@ test_main (void)
   return ret;
 }
 
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index 77b6e8c857ba418448e484a8236798c8bd679b8f..d4de65a5907f92e648a9d37a2dc88bc55aa6c869 100644 (file)
@@ -242,4 +242,4 @@ test_main (void)
   return ret;
 }
 
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index 2c36b44c22c36b9b75ec0f19e9a3e9aa83796a7b..3f728764542466af5c4c0e32903b1933ec6fd38b 100644 (file)
@@ -40,6 +40,7 @@ extern impl_t __start_impls[], __stop_impls[];
 
 #undef __USE_STRING_INLINES
 
+#include <getopt.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -55,7 +56,7 @@ extern impl_t __start_impls[], __stop_impls[];
 #define GLRO(x) _##x
 
 
-# define TEST_FUNCTION test_main ()
+# define TEST_FUNCTION test_main
 # define TIMEOUT (4 * 60)
 # define OPT_ITERATIONS 10000
 # define OPT_RANDOM 10001
@@ -83,23 +84,31 @@ size_t iterations = 100000;
 # define CMDLINE_OPTIONS ITERATIONS_OPTIONS \
   { "random", no_argument, NULL, OPT_RANDOM }, \
   { "seed", required_argument, NULL, OPT_SEED },
-# define CMDLINE_PROCESS ITERATIONS_PROCESS \
-  case OPT_RANDOM:                                                     \
-    {                                                                  \
-      int fdr = open ("/dev/urandom", O_RDONLY);                       \
-                                                                       \
-      if (fdr < 0 || read (fdr, &seed, sizeof(seed)) != sizeof (seed)) \
-       seed = time (NULL);                                             \
-      if (fdr >= 0)                                                    \
-       close (fdr);                                                    \
-      do_srandom = 1;                                                  \
-      break;                                                           \
-    }                                                                  \
-                                                                       \
-  case OPT_SEED:                                                       \
-    seed = strtoul (optarg, NULL, 0);                                  \
-    do_srandom = 1;                                                    \
-    break;
+
+static void __attribute__ ((used))
+cmdline_process_function (int c)
+{
+  switch (c)
+    {
+      ITERATIONS_PROCESS
+      case OPT_RANDOM:
+        {
+          int fdr = open ("/dev/urandom", O_RDONLY);
+          if (fdr < 0 || read (fdr, &seed, sizeof (seed)) != sizeof (seed))
+            seed = time (NULL);
+          if (fdr >= 0)
+            close (fdr);
+          do_srandom = 1;
+          break;
+        }
+
+      case OPT_SEED:
+        seed = strtoul (optarg, NULL, 0);
+        do_srandom = 1;
+        break;
+    }
+}
+# define CMDLINE_PROCESS cmdline_process_function
 
 #define CALL(impl, ...)        \
   (* (proto_t) (impl)->fn) (__VA_ARGS__)
index 5d30e104681514d3859d3f6145774482dc0bf6d2..99be380e6e9bb70e655c878636f043f114b42d2f 100644 (file)
@@ -164,4 +164,4 @@ test_main (void)
   return ret;
 }
 
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index 1e05f028ff009fb622e9d36521991e6b35d78edc..bf501cf7987e77cc2e5bc868e0f32d35b6e1ef51 100644 (file)
@@ -350,4 +350,4 @@ test_main (void)
   return ret;
 }
 
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index 26a6b5b91dfe68fbd96d91a606788d7705a4758b..66d58e534d3128cf30a629c0670103d897c412b2 100644 (file)
@@ -319,4 +319,4 @@ test_main (void)
   return ret;
 }
 
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index a245d0b93d00112aecae00b291682b793b4fbca7..fe3c4e33201d4b4e4f28a8fd3a4227890b5cfaa7 100644 (file)
@@ -476,4 +476,4 @@ test_main (void)
   return ret;
 }
 
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index 88d1d44e49a422d7fa55c56a0eff23187bfa2a19..43f9c236f1cab647b9efdce9d0037551c9ba10ef 100644 (file)
@@ -320,4 +320,4 @@ test_main (void)
   return ret;
 }
 
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index 7059669b24163430cda0ca165f5c8c064217495a..277146fb6c4a682dc989a01166fd0130df2e01ff 100644 (file)
@@ -191,4 +191,4 @@ test_main (void)
   return ret;
 }
 
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index f7a0a4f2aa7e6d2f65557be38328b1d7b7a8b19b..4d680ab354ef18866e975a56afe63bb58786aefa 100644 (file)
@@ -264,4 +264,4 @@ test_main (void)
   return ret;
 }
 
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index 8908ddac652a52cb5cf900eaf1ab7d5c92a69d38..10c070aef102711ebfca4f3f9de31d771f82b521 100644 (file)
@@ -244,4 +244,4 @@ test_main (void)
   return ret;
 }
 
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index c32a6958df5ce3c8a44800d86aff5ad25c71c53d..d26331fb6db0e5f2040856f999b3fb5188d1dbe3 100644 (file)
@@ -242,4 +242,4 @@ test_main (void)
   return ret;
 }
 
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index c29d37446c597cd1a0bdefe272ea7d09eecf1ce9..21944f41a32e0b94ed96e593315dd57e7e5eb5c6 100644 (file)
@@ -208,4 +208,4 @@ test_main (void)
   return ret;
 }
 
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index d3e432dbf50fc6d983767dfa931cbb1b878880d6..def6e2f28a2fed8f4b8b56f0e6a6289bcd58f339 100644 (file)
@@ -21,7 +21,7 @@
 
 extern unsigned long long int wash (unsigned long long int a);
 
-static int
+int
 do_test (void)
 {
   int result = 0;
@@ -72,5 +72,4 @@ wash (unsigned long long int a)
   return a + 0;
 }
 
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index ae63228318d48f2130efa7be04e494a072102c30..d7720194e9e570473e870825cd377359143bd278 100644 (file)
@@ -107,7 +107,7 @@ strncasecmp_max (const char *left, const char *right)
   return strncasecmp (left, right, SIZE_MAX);
 }
 
-static int
+int
 do_test (void)
 {
   enum {
@@ -209,5 +209,4 @@ do_test (void)
    machines.  */
 #define TIMEOUT 300
 
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index d3c7c2c4c594b23e83fc515b5c08f28ee19e8938..b156ede1999da8250314689be824f0d2b30e15d5 100644 (file)
@@ -18,7 +18,7 @@
 # define DIAG_IGNORE_NEEDS_COMMENT_TAUTOLOGICAL_COMPARE()
 #endif
 
-static int
+int
 do_test (void)
 {
   int result = 0;
@@ -131,5 +131,4 @@ do_test (void)
   return result;
 }
 
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index 54a0f373c652c3c3c0227de34b435f2e229364f1..f39f2c33a017e16de18ae042b90e71920d7c5352 100644 (file)
@@ -31,7 +31,7 @@
 #include <fcntl.h>
 
 
-static int
+int
 do_test (void)
 {
   int status;
@@ -81,5 +81,4 @@ do_test (void)
   return status;
 }
 
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index ee694b61c056bf6f3c190ede0499e8bdddacfe7e..826af4f8a83e7924d6eb25793a7d370f746e5540 100644 (file)
@@ -30,7 +30,7 @@
    64-bit.  */
 #define SIZE 0x40000000ul
 
-static int
+int
 do_test (void)
 {
   TEST_VERIFY_EXIT (setlocale (LC_COLLATE, "en_GB.UTF-8") != NULL);
index 2b40a39b132efbfd267d26182299d9f47465a336..e4e9018c5b0d67c4a6109aa542c216eee88a452a 100644 (file)
@@ -1,7 +1,7 @@
 #include <stdio.h>
 #include <string.h>
 
-static int
+int
 do_test (void)
 {
   char str[] = "this is a test";
@@ -11,5 +11,4 @@ do_test (void)
   return 0;
 }
 
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index 8376831de559c12057a7a432dc91953fb4e9624f..15fbc8bd7b095958e0a8d6e4b8540d4079094d54 100644 (file)
@@ -5,7 +5,7 @@
 #include <stdio.h>
 #include <string.h>
 
-static int
+int
 do_test (void)
 {
   static const size_t lens[] = { 0, 1, 0, 2, 0, 1, 0, 3,
@@ -54,5 +54,4 @@ strnlen failed for base=%Zu, words=%Zu, and last=%Zu (is %zd, expected %zd)\n",
   return 0;
 }
 
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index 6fbef9f33e4f5b0912f99532f255fad929a316f0..628e106a4646c378e9bdbf943c0e74f4e7726cfb 100644 (file)
@@ -2,7 +2,7 @@
 #include <stdio.h>
 #include <string.h>
 
-static int
+int
 do_test (void)
 {
   char buf[1] = { 0 };
@@ -22,5 +22,4 @@ do_test (void)
   return result;
 }
 
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index 96749b6a2a2ae1008c491f9b8b1751649d0fbb88..fc3ed60b63919523a780c83ad28662c8a8de2344 100644 (file)
@@ -35,4 +35,4 @@ test_main (void)
   return strcmp (tok, "udf") != 0;
 }
 
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index f48cfc0da441d1e7efaa1f50c766f482b494da7b..ffe191c60d9a290f19deab6b001d8f789fdaa0c4 100644 (file)
@@ -58,7 +58,7 @@ test (const char *locale)
 }
 
 
-static int
+int
 do_test (void)
 {
   int result = 0;
@@ -70,5 +70,4 @@ do_test (void)
   return result;
 }
 
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index bea5aa2ceab60b7e8aee76090ebd3ad5fbb16c17..12117e80d63494aceda06f5b6dfa27df22776c07 100644 (file)
@@ -2,7 +2,7 @@
 #include <stdio.h>
 #include <string.h>
 
-static int
+int
 do_test (void)
 {
   static const char test_locale[] = "de_DE.UTF-8";
@@ -81,5 +81,4 @@ do_test (void)
   return res;
 }
 
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index 1b0da3efe5f35c57ad0a7a32c7a579f9808602d2..d5cf2c19c9ba048f81a147fe3ab2d87201f93aac 100644 (file)
@@ -13,7 +13,7 @@ compare (const void *p1, const void *p2)
   return strverscmp (*((char **) p1), *((char **) p2));
 }
 
-static int
+int
 do_test (void)
 {
   char line[MAX_LINE_SIZE + 1];
@@ -44,5 +44,4 @@ do_test (void)
   return EXIT_SUCCESS;
 }
 
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
index 12c88aa2b8c10c71943ad3dad745f4cc5e68a13c..c0aa03dc180a0872fd2c1c990c2e646b013a3f9a 100644 (file)
@@ -26,7 +26,7 @@ compare (const char *str1, const char *str2, int exp)
 }
 
 
-static int
+int
 do_test (void)
 {
   int res = 0;
@@ -58,5 +58,4 @@ do_test (void)
   return res;
 }
 
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>