Modify several tests to use test-skeleton.c

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.
This commit is contained in:
Arjun Shankar 2015-08-03 16:14:21 +00:00 committed by Mike Frysinger
parent a03ba36305
commit c1f4108352
19 changed files with 165 additions and 36 deletions

View File

@ -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.

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View File

@ -132,8 +132,8 @@ fp_test (void)
printf("%-10s\n", (char *) NULL);
}
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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"