From 0035851c3c13f26b92fc076540d112069918a3e1 Mon Sep 17 00:00:00 2001 From: Arjun Shankar Date: Thu, 9 Jul 2015 15:29:17 +0000 Subject: Modify several tests to use test-skeleton.c These tests were skipped by the use-test-skeleton conversion done in commit 29955b5d because they were reused in other tests via the #include directive, and so deemed worth an inspection before they were modified. This has now been done. ChangeLog: 2015-07-09 Arjun Shankar * elf/tst-leaks1.c (main): Converted to ... (do_test): ... this. (TEST_FUNCTION): New macro. Include test-skeleton.c. * localedata/tst-langinfo.c (main): Converted to ... (do_test): ... this. (TEST_FUNCTION): New macro. Include test-skeleton.c. * math/test-fpucw.c (main): Converted to ... (do_test): ... this. (TEST_FUNCTION): New macro. Include test-skeleton.c. * math/test-tgmath.c (main): Converted to ... (do_test): ... this. (TEST_FUNCTION): New macro. Include test-skeleton.c. * math/test-tgmath2.c (main): Converted to ... (do_test): ... this. (TEST_FUNCTION): New macro. Include test-skeleton.c. * setjmp/tst-setjmp.c (main): Converted to ... (do_test): ... this. (TEST_FUNCTION): New macro. Include test-skeleton.c. * stdio-common/tst-sscanf.c (main): Converted to ... (do_test): ... this. (TEST_FUNCTION): New macro. Include test-skeleton.c. * sysdeps/x86_64/tst-audit6.c (main): Converted to ... (do_test): ... this. (TEST_FUNCTION): New macro. Include test-skeleton.c. --- math/test-fpucw.c | 7 +++++-- math/test-tgmath.c | 7 +++++-- math/test-tgmath2.c | 7 +++++-- 3 files changed, 15 insertions(+), 6 deletions(-) (limited to 'math') diff --git a/math/test-fpucw.c b/math/test-fpucw.c index 21e6d2e8f6..a3331197ef 100644 --- a/math/test-fpucw.c +++ b/math/test-fpucw.c @@ -23,8 +23,8 @@ # define FPU_CONTROL _FPU_DEFAULT #endif -int -main (void) +static int +do_test (void) { #ifdef _FPU_GETCW /* Some architectures don't have _FPU_GETCW (e.g. Linux/Alpha). */ @@ -44,3 +44,6 @@ main (void) return 0; #endif } + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/math/test-tgmath.c b/math/test-tgmath.c index ef5ac20b9a..b82413eb31 100644 --- a/math/test-tgmath.c +++ b/math/test-tgmath.c @@ -54,8 +54,8 @@ int count_cldouble; #define NCALLS_INT 4 #define NCCALLS 47 -int -main (void) +static int +do_test (void) { int result = 0; @@ -210,6 +210,9 @@ main (void) #include "test-tgmath.c" #endif +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" + #else #ifdef DEBUG diff --git a/math/test-tgmath2.c b/math/test-tgmath2.c index 467debac8c..b03bc55676 100644 --- a/math/test-tgmath2.c +++ b/math/test-tgmath2.c @@ -334,8 +334,8 @@ test (const int Vint4, const long long int Vllong4) return result; } -int -main (void) +static int +do_test (void) { return test (vint1, vllong1); } @@ -366,6 +366,9 @@ main (void) #include "test-tgmath2.c" #endif +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" + #else #ifdef DEBUG -- cgit 1.4.1