]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Modify several tests to use test-skeleton.c
authorArjun Shankar <arjun.is@lostca.se>
Mon, 3 Aug 2015 16:14:21 +0000 (16:14 +0000)
committerMike Frysinger <vapier@gentoo.org>
Thu, 6 Aug 2015 06:59:04 +0000 (02:59 -0400)
These tests were skipped by the use-test-skeleton conversion done in
commit 29955b5d because they did not have an `int main (void)'
declaration. Instead their `main' functions were declared with arguments
(i.e. argc, argv) even though they didn't use them.

Remove these arguments and include the test skeleton in these tests.

19 files changed:
ChangeLog
dirent/tst-seekdir.c
elf/tst-dlmodcount.c
elf/tst-order-main.c
elf/tst-pie2.c
inet/tst-ether_aton.c
misc/tst-mntent.c
misc/tst-tsearch.c
posix/tst-regexloc.c
resolv/tst-aton.c
stdio-common/test-fwrite.c
stdio-common/tst-ferror.c
stdio-common/tst-printf.c
stdio-common/tst-printfsz.c
stdlib/tst-strtod.c
string/tst-strlen.c
string/tst-svc.c
time/tst-strptime.c
timezone/tst-timezone.c

index a13ddd04ced55bb50d447201ff964ad1d3786dc2..d37ae1a8b1577979db004811487c65892157bc5b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,78 @@
+2015-08-06  Arjun Shankar  <arjun.is@lostca.se>
+
+       * dirent/tst-seekdir.c (main): Converted to ...
+       (do_test): ... this.
+       (TEST_FUNCTION): New macro.
+       Include test-skeleton.c.
+       * elf/tst-dlmodcount.c (main): Converted to ...
+       (do_test): ... this.
+       (TEST_FUNCTION): New macro.
+       Include test-skeleton.c.
+       * elf/tst-order-main.c (main): Converted to ...
+       (do_test): ... this.
+       (TEST_FUNCTION): New macro.
+       Include test-skeleton.c.
+       * elf/tst-pie2.c (main): Converted to ...
+       (do_test): ... this.
+       (TEST_FUNCTION): New macro.
+       Include test-skeleton.c.
+       * inet/tst-ether_aton.c (main): Converted to ...
+       (do_test): ... this.
+       (TEST_FUNCTION): New macro.
+       Include test-skeleton.c.
+       * misc/tst-mntent.c (main): Converted to ...
+       (do_test): ... this.
+       (TEST_FUNCTION): New macro.
+       Include test-skeleton.c.
+       * misc/tst-tsearch.c (main): Converted to ...
+       (do_test): ... this.
+       (TEST_FUNCTION): New macro.
+       Include test-skeleton.c.
+       * posix/tst-regexloc.c (main): Converted to ...
+       (do_test): ... this.
+       (TEST_FUNCTION): New macro.
+       Include test-skeleton.c.
+       * resolv/tst-aton.c (main): Converted to ...
+       (do_test): ... this.
+       (TEST_FUNCTION): New macro.
+       Include test-skeleton.c.
+       * stdio-common/test-fwrite.c (main): Converted to ...
+       (do_test): ... this.
+       (TEST_FUNCTION): New macro.
+       Include test-skeleton.c.
+       * stdio-common/tst-ferror.c (main): Converted to ...
+       (do_test): ... this.
+       (TEST_FUNCTION): New macro.
+       Include test-skeleton.c.
+       * stdio-common/tst-printf.c (main): Converted to ...
+       (do_test): ... this.
+       (TEST_FUNCTION): New macro.
+       Include test-skeleton.c.
+       * stdio-common/tst-printfsz.c (main): Converted to ...
+       (do_test): ... this.
+       (TEST_FUNCTION): New macro.
+       Include test-skeleton.c.
+       * stdlib/tst-strtod.c (main): Converted to ...
+       (do_test): ... this.
+       (TEST_FUNCTION): New macro.
+       Include test-skeleton.c.
+       * string/tst-strlen.c (main): Converted to ...
+       (do_test): ... this.
+       (TEST_FUNCTION): New macro.
+       Include test-skeleton.c.
+       * string/tst-svc.c (main): Converted to ...
+       (do_test): ... this.
+       (TEST_FUNCTION): New macro.
+       Include test-skeleton.c.
+       * time/tst-strptime.c (main): Converted to ...
+       (do_test): ... this.
+       (TEST_FUNCTION): New macro.
+       Include test-skeleton.c.
+       * timezone/tst-timezone.c (main): Converted to ...
+       (do_test): ... this.
+       (TEST_FUNCTION): New macro.
+       Include test-skeleton.c.
+
 2015-08-05  Zack Weinberg  <zackw@panix.com>
 
        * misc/regexp.h: Update comments.
index 43808fecb58a48d41bae0464293cae0a677e8c1b..dcdd699b097563d386bfc8f2f7b61c98e60ec48b 100644 (file)
@@ -2,8 +2,8 @@
 #include <dirent.h>
 #include <stdlib.h>
 
-int
-main (int argc, char *argv[])
+static int
+do_test (void)
 {
   DIR * dirp;
   long int save3 = 0;
@@ -76,3 +76,6 @@ main (int argc, char *argv[])
   closedir (dirp);
   return result;
 }
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
index 64df2fa18a01894e16fe33d80190d31a10e016d5..6cfa36683634251d477d7548a62ff51f9cdb3acd 100644 (file)
@@ -92,8 +92,8 @@ unload (const char *path, void *handle)
   dl_iterate_phdr (callback, (void *)(intptr_t) REMOVE);
 }
 
-int
-main (int argc, char **argv)
+static int
+do_test (void)
 {
   void *handle1, *handle2;
 
@@ -104,3 +104,6 @@ main (int argc, char **argv)
   unload ("globalmod1.so", handle2);
   return 0;
 }
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
index 80f4f6be185072de8f5b0838bcac2a48efe9239b..339778a93a52b527b1075da3002a8d49e4b7263d 100644 (file)
@@ -2,9 +2,12 @@
 #include <unistd.h>
 #include <stdlib.h>
 
-int
-main( int argc, char *argv[] )
+static int
+do_test (void)
 {
   printf( "main\n" );
   exit(EXIT_SUCCESS);
 }
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
index b76b3236e4bfa717071fb76a1a622f5159d5eb64..a22fc521bc86b6c19dd708df4012b7861d16faac 100644 (file)
@@ -31,8 +31,11 @@ init_g (void)
   g += 1;
 }
 
-int
-main (int argc, char *argv[])
+static int
+do_test (void)
 {
   return 0;
 }
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
index 94ceec80ff0a1efdd49b21f7ed1ee0594ece3ec9..eba350ed3a7481f0b66cbdfa74be36874c607652 100644 (file)
@@ -2,8 +2,8 @@
 #include <string.h>
 #include <netinet/ether.h>
 
-int
-main (int argc, char *argv[])
+static int
+do_test (void)
 {
   struct ether_addr *valp, val;
   int result, r;
@@ -55,3 +55,6 @@ main (int argc, char *argv[])
 
   return result;
 }
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
index 876c89f8ed313de9c9db97fae0831f22fcc3f40d..932fd3f522a300d73fd1af8641b02800a21c1fad 100644 (file)
@@ -5,8 +5,8 @@
 #include <string.h>
 
 
-int
-main (int argc, char *argv[])
+static int
+do_test (void)
 {
   int result = 0;
   struct mntent mef;
@@ -97,3 +97,6 @@ main (int argc, char *argv[])
 
   return result;
 }
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
index 70b6c339fcfe0c12a5d2d6e4e900eb54892be51a..dca22820c32f9274f92eceeb6b6b2d3f1a8b1046 100644 (file)
@@ -248,8 +248,8 @@ mangle_tree (enum order how, enum action what, void **root, int lag)
 }
 
 
-int
-main (int argc, char **argv)
+static int
+do_test (void)
 {
   int total_error = 0;
   static char state[8] = { 1, 2, 3, 4, 5, 6, 7, 8 };
@@ -350,3 +350,6 @@ main (int argc, char **argv)
 
   return total_error;
 }
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
index 38bf87abbff0bce93044f6cfc4c1410554b8e5eb..62b739e4e20c1852a6ca5ee72ac87b904e5d70eb 100644 (file)
@@ -23,8 +23,8 @@
 #include <locale.h>
 #include <stdio.h>
 
-int
-main (int argc, char *argv[])
+static int
+do_test (void)
 {
   regex_t re;
   regmatch_t mat[1];
@@ -44,3 +44,6 @@ main (int argc, char *argv[])
 
   return res;
 }
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
index 4e9caf96f4833891fe3934999b52b097a9915f93..08110a007af909fffc9412634254e22954675938 100644 (file)
@@ -44,8 +44,8 @@ static struct tests
 };
 
 
-int
-main (int argc, char *argv[])
+static int
+do_test (void)
 {
   int result = 0;
   size_t cnt;
@@ -72,3 +72,6 @@ main (int argc, char *argv[])
 
   return result;
 }
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
index ce541699310f23e7da78f420f7380676388076d8..5677c6da80c90c621c7c245aa4ac8ee9c28438c1 100644 (file)
@@ -1,8 +1,8 @@
 #include <stdio.h>
 #include <string.h>
 
-int
-main (int argc, char *argv[])
+static int
+do_test (void)
 {
   FILE *f = tmpfile ();
   char obuf[99999], ibuf[sizeof obuf];
@@ -66,3 +66,6 @@ There is absolutely no warranty for GDB; type \"show warranty\" for details.\n\
   puts ("Test succeeded.");
   return 0;
 }
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
index 5f23002c7a79601044b10c54ff5ba8110351edb5..69592df048a628efc248e02d1ad5e6cf0e73bec1 100644 (file)
@@ -1,7 +1,7 @@
 #include <stdio.h>
 
-int
-main (int argc, char *argv[])
+static int
+do_test (void)
 {
   char buf[100];
   int result = 0;
@@ -39,3 +39,6 @@ main (int argc, char *argv[])
     }
   return result;
 }
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
index 8011033d73d60ef7e56a82a44a15a7d07fe219de..88525084e8a22b83df01cfbe10cfc9f1af9ee103 100644 (file)
@@ -132,8 +132,8 @@ fp_test (void)
   printf("%-10s\n", (char *) NULL);
 }
 \f
-int
-main (int argc, char *argv[])
+static int
+do_test (void)
 {
   static char shortstr[] = "Hi, Z.";
   static char longstr[] = "Good morning, Doctor Chandra.  This is Hal.  \
@@ -393,3 +393,6 @@ rfg3 (void)
     printf ("got: '%s', expected: '%s'\n", buf,
            "   12345  1234    11145401322     321.765432   3.217654e+02   5    test-string");
 }
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
index 902b2ac27b8310456dac20c490a4c200155182a2..8a3385f94df9960d62fc35f79312cc4bd04270d4 100644 (file)
@@ -7,8 +7,8 @@
 #define V       12345678.12345678
 
 
-int
-main (int argc, char *argv[])
+static int
+do_test (void)
 {
   char buf[1024];
   int result = 0;
@@ -76,3 +76,6 @@ main (int argc, char *argv[])
 
   return result;
 }
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
index a469208a49c840dd7361f3c0c2ecc655a4a08b0d..b985990822d685b6720280ef77a325165cadd408 100644 (file)
@@ -81,8 +81,8 @@ static void expand (char *dst, int c);
 static int long_dbl (void);
 static int locale_test (void);
 
-int
-main (int argc, char ** argv)
+static int
+do_test (void)
 {
   char buf[100];
   const struct ltest *lt;
@@ -276,3 +276,6 @@ locale_test (void)
 
   return result;
 }
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
index 8cbe4419752d055ce4582c310602c66c97837b5c..8376831de559c12057a7a432dc91953fb4e9624f 100644 (file)
@@ -5,8 +5,8 @@
 #include <stdio.h>
 #include <string.h>
 
-int
-main(int argc, char *argv[])
+static int
+do_test (void)
 {
   static const size_t lens[] = { 0, 1, 0, 2, 0, 1, 0, 3,
                                 0, 1, 0, 2, 0, 1, 0, 4 };
@@ -53,3 +53,6 @@ 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"
index 1ee5342aa94ac52e7cc4e5dbbe3e0eea4828b5b6..1b0da3efe5f35c57ad0a7a32c7a579f9808602d2 100644 (file)
@@ -13,8 +13,8 @@ compare (const void *p1, const void *p2)
   return strverscmp (*((char **) p1), *((char **) p2));
 }
 
-int
-main (int argc, char *argv[])
+static int
+do_test (void)
 {
   char line[MAX_LINE_SIZE + 1];
   char *str[MAX_STRINGS];
@@ -43,3 +43,6 @@ main (int argc, char *argv[])
 
   return EXIT_SUCCESS;
 }
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
index 8c0a947ad9bf3610550c26c7dbb925a7fc7bd858..9a2199f87532b785654c74e72460955d5e2936be 100644 (file)
@@ -124,8 +124,8 @@ test_tm (void)
 }
 
 
-int
-main (int argc, char *argv[])
+static int
+do_test (void)
 {
   struct tm tm;
   size_t i;
@@ -194,3 +194,6 @@ main (int argc, char *argv[])
 
   return result;
 }
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
index 7152809d6c42c73c2455d9c07fc2ebe10e8a50bb..0223a801efcff6c68bf0cd2a69307b3cc4caafa6 100644 (file)
@@ -87,8 +87,8 @@ check_tzvars (const char *name, int dayl, int timez, const char *const tznam[])
 }
 
 
-int
-main (int argc, char ** argv)
+static int
+do_test (void)
 {
   time_t t;
   const struct test_times *pt;
@@ -166,3 +166,6 @@ main (int argc, char ** argv)
 
   return failed ? EXIT_FAILURE : EXIT_SUCCESS;
 }
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"