From patchwork Tue Apr 25 17:49:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wainer dos Santos Moschetta X-Patchwork-Id: 20141 Received: (qmail 17403 invoked by alias); 25 Apr 2017 17:49:16 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 17348 invoked by uid 89); 25 Apr 2017 17:49:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.4 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=355, 1274, 974, 324 X-HELO: mail-qt0-f194.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ieY71GOx7FmWObZQXy3XkfRWM40K9a/qaTURv+FBB6E=; b=B8YGVtw8dKekWKo5gXMPPny08KcPxAPXZC6Kert6juXLLGn+qB8QZLSatqSXpCYsXB 6Jxxj46x7TywGkkUT9Chmg6PZhY4upuNDjmsqE5lce+cJZdye/CokzhThSeZ0MttnxCP nnZSuwQzGkjYdumLpLJJKypt8Y4ZD19cO7MsT1lMj1imlV/xP2kAKjXZi+SJs1Ef4EmU WBcR2M+a66HTQOKJzrueFKVYpTS5cfGyenJGlNM8TaArG0wAx1lP85T0h49TcC+etjtM a+vNZjy8/orn6q+LKGX4NY9Cvqik/jzLbKqzvF0tESRjMWRAXtreYQEUX1xFXh1Emi7G bs3w== X-Gm-Message-State: AN3rC/5qZlhQwfhNp2QUx7XjTpieLIkaN6QP3gcDLnncDnWpgzzMwWZw qIYNImuMi6InkYex X-Received: by 10.200.47.91 with SMTP id k27mr31108630qta.11.1493142552906; Tue, 25 Apr 2017 10:49:12 -0700 (PDT) From: Wainer dos Santos Moschetta To: libc-alpha@sourceware.org Cc: Wainer dos Santos Moschetta Subject: [PATCH] Migrate grp/gshadow/inet/nss/pwd/resolv/shadow tests to support test driver Date: Tue, 25 Apr 2017 14:49:00 -0300 Message-Id: <1493142540-3354-1-git-send-email-wainersm@gmail.com> Updated all tests of grp, gshadow, inet, nss, pwd, resolv, and shadow to use the support test driver. Checked on x86_64-linux-gnu. 2017-04-25 Wainer dos Santos Moschetta * grp/tst-putgrent.c: Replace test-skeleton.c with support/test-driver.c and remove TEST_FUNCTION macro. * gshadow/tst-gshadow.c: Likewise. * gshadow/tst-putsgent.c: Likewise. * inet/bug-if1.c: Likewise. * inet/test-ifaddrs.c: Likewise. * inet/test-inet6_opt.c: Likewise. * inet/test_ifindex.c: Likewise. * inet/tst-ether_aton.c: Likewise. * inet/tst-ether_line.c: Likewise. * inet/tst-gethnm.c: Likewise. * inet/tst-getni1.c: Likewise. * inet/tst-getni2.c: Likewise. * inet/tst-inet6_rth.c: Likewise. * inet/tst-inet6_scopeid_pton.c: Likewise. * inet/tst-network.c: Likewise. * inet/tst-ntoa.c: Likewise. * inet/tst-sockaddr.c: Likewise. * nss/bug17079.c: Likewise. * nss/test-digits-dots.c: Likewise. * nss/test-netdb.c: Likewise. * nss/tst-field.c: Likewise. * nss/tst-nss-getpwent.c: Likewise. * nss/tst-nss-static.c: Likewise. * nss/tst-nss-test1.c: Likewise. * pwd/tst-getpw.c: Likewise. * pwd/tst-putpwent.c: Likewise. * resolv/tst-aton.c: Likewise. * resolv/tst-inet_ntop.c: Likewise. * resolv/tst-leaks.c: Likewise. * resolv/tst-leaks2.c: Likewise. * resolv/tst-res_hconf_reorder.c: Likewise. * shadow/tst-putspent.c: Likewise. * shadow/tst-shadow.c: Likewise. --- grp/tst-putgrent.c | 3 +-- gshadow/tst-gshadow.c | 21 +++++++++++++++++++-- gshadow/tst-putsgent.c | 3 +-- inet/bug-if1.c | 3 +-- inet/test-ifaddrs.c | 3 +-- inet/test-inet6_opt.c | 3 +-- inet/test_ifindex.c | 3 +-- inet/tst-ether_aton.c | 3 +-- inet/tst-ether_line.c | 3 +-- inet/tst-gethnm.c | 3 +-- inet/tst-getni1.c | 3 +-- inet/tst-getni2.c | 3 +-- inet/tst-inet6_rth.c | 3 +-- inet/tst-inet6_scopeid_pton.c | 3 +-- inet/tst-network.c | 3 +-- inet/tst-ntoa.c | 3 +-- inet/tst-sockaddr.c | 3 +-- nss/bug17079.c | 3 +-- nss/test-digits-dots.c | 3 +-- nss/test-netdb.c | 3 +-- nss/tst-field.c | 3 +-- nss/tst-nss-getpwent.c | 3 +-- nss/tst-nss-static.c | 3 +-- nss/tst-nss-test1.c | 21 +++++++++++++++++++-- pwd/tst-getpw.c | 3 +-- pwd/tst-putpwent.c | 3 +-- resolv/tst-aton.c | 3 +-- resolv/tst-inet_ntop.c | 3 +-- resolv/tst-leaks.c | 9 +++------ resolv/tst-leaks2.c | 3 +-- resolv/tst-res_hconf_reorder.c | 3 +-- shadow/tst-putspent.c | 3 +-- shadow/tst-shadow.c | 3 +-- 33 files changed, 71 insertions(+), 70 deletions(-) diff --git a/grp/tst-putgrent.c b/grp/tst-putgrent.c index 0175ec0..fa8e2ce 100644 --- a/grp/tst-putgrent.c +++ b/grp/tst-putgrent.c @@ -163,5 +163,4 @@ do_test (void) return errors; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include diff --git a/gshadow/tst-gshadow.c b/gshadow/tst-gshadow.c index 8b469b7..20da084 100644 --- a/gshadow/tst-gshadow.c +++ b/gshadow/tst-gshadow.c @@ -1,3 +1,21 @@ +/* Test for gshadow functions. + Copyright (C) 2009-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + #include #include #include @@ -137,5 +155,4 @@ do_test (void) return result; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include diff --git a/gshadow/tst-putsgent.c b/gshadow/tst-putsgent.c index 218d458..8919db8 100644 --- a/gshadow/tst-putsgent.c +++ b/gshadow/tst-putsgent.c @@ -164,5 +164,4 @@ do_test (void) return errors; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include diff --git a/inet/bug-if1.c b/inet/bug-if1.c index b70a19d..d858fcc 100644 --- a/inet/bug-if1.c +++ b/inet/bug-if1.c @@ -49,5 +49,4 @@ do_test (void) return 0; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include diff --git a/inet/test-ifaddrs.c b/inet/test-ifaddrs.c index 2baf9ad..92323c9 100644 --- a/inet/test-ifaddrs.c +++ b/inet/test-ifaddrs.c @@ -95,5 +95,4 @@ Name Flags Address Netmask Broadcast/Destination"); return failures ? 1 : 0; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include diff --git a/inet/test-inet6_opt.c b/inet/test-inet6_opt.c index a7ebf00..4c9388e 100644 --- a/inet/test-inet6_opt.c +++ b/inet/test-inet6_opt.c @@ -207,5 +207,4 @@ do_test (void) return 0; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include diff --git a/inet/test_ifindex.c b/inet/test_ifindex.c index 06cdb78..0844a99 100644 --- a/inet/test_ifindex.c +++ b/inet/test_ifindex.c @@ -63,5 +63,4 @@ do_test (void) return failures ? 1 : 0; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include diff --git a/inet/tst-ether_aton.c b/inet/tst-ether_aton.c index eba350e..afe2449 100644 --- a/inet/tst-ether_aton.c +++ b/inet/tst-ether_aton.c @@ -56,5 +56,4 @@ do_test (void) return result; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include diff --git a/inet/tst-ether_line.c b/inet/tst-ether_line.c index ff0560b..bb1929f 100644 --- a/inet/tst-ether_line.c +++ b/inet/tst-ether_line.c @@ -34,5 +34,4 @@ do_test (void) return res; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include diff --git a/inet/tst-gethnm.c b/inet/tst-gethnm.c index dd3a547..bda52af 100644 --- a/inet/tst-gethnm.c +++ b/inet/tst-gethnm.c @@ -63,5 +63,4 @@ do_test (void) return result; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include diff --git a/inet/tst-getni1.c b/inet/tst-getni1.c index 3960f71..c9e654a 100644 --- a/inet/tst-getni1.c +++ b/inet/tst-getni1.c @@ -32,5 +32,4 @@ do_test (void) return retval; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include diff --git a/inet/tst-getni2.c b/inet/tst-getni2.c index 66e7806..ab6d74c 100644 --- a/inet/tst-getni2.c +++ b/inet/tst-getni2.c @@ -37,5 +37,4 @@ do_test (void) return retval; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include diff --git a/inet/tst-inet6_rth.c b/inet/tst-inet6_rth.c index 549d717..d766dae 100644 --- a/inet/tst-inet6_rth.c +++ b/inet/tst-inet6_rth.c @@ -188,5 +188,4 @@ address %d after second inet6_rth_reverse wrong (%s)\n", return res; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include diff --git a/inet/tst-inet6_scopeid_pton.c b/inet/tst-inet6_scopeid_pton.c index 2178c5b..26d1741 100644 --- a/inet/tst-inet6_scopeid_pton.c +++ b/inet/tst-inet6_scopeid_pton.c @@ -127,5 +127,4 @@ do_test (void) return 0; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include diff --git a/inet/tst-network.c b/inet/tst-network.c index 825b0cb..0e42255 100644 --- a/inet/tst-network.c +++ b/inet/tst-network.c @@ -77,5 +77,4 @@ do_test (void) return errors != 0; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include diff --git a/inet/tst-ntoa.c b/inet/tst-ntoa.c index ef82d4d..7ebbf63 100644 --- a/inet/tst-ntoa.c +++ b/inet/tst-ntoa.c @@ -35,5 +35,4 @@ do_test (void) return result; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include diff --git a/inet/tst-sockaddr.c b/inet/tst-sockaddr.c index dccc3da..d6d98e7 100644 --- a/inet/tst-sockaddr.c +++ b/inet/tst-sockaddr.c @@ -121,5 +121,4 @@ do_test (void) return errors; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include diff --git a/nss/bug17079.c b/nss/bug17079.c index 4171c7d..9bc58ea 100644 --- a/nss/bug17079.c +++ b/nss/bug17079.c @@ -240,5 +240,4 @@ do_test (void) return 0; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include diff --git a/nss/test-digits-dots.c b/nss/test-digits-dots.c index 2685161..374a25e 100644 --- a/nss/test-digits-dots.c +++ b/nss/test-digits-dots.c @@ -34,5 +34,4 @@ do_test (void) return err == ERANGE && h_err == NETDB_INTERNAL ? EXIT_SUCCESS : EXIT_FAILURE; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include diff --git a/nss/test-netdb.c b/nss/test-netdb.c index 319541b..20bbc80 100644 --- a/nss/test-netdb.c +++ b/nss/test-netdb.c @@ -336,5 +336,4 @@ do_test (void) return (error_count != 0); } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include diff --git a/nss/tst-field.c b/nss/tst-field.c index d80be68..3722b7b 100644 --- a/nss/tst-field.c +++ b/nss/tst-field.c @@ -97,5 +97,4 @@ do_test (void) return errors; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include diff --git a/nss/tst-nss-getpwent.c b/nss/tst-nss-getpwent.c index 7bd69fc..9f03035 100644 --- a/nss/tst-nss-getpwent.c +++ b/nss/tst-nss-getpwent.c @@ -115,5 +115,4 @@ do_test (void) } #define TIMEOUT 300 -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include diff --git a/nss/tst-nss-static.c b/nss/tst-nss-static.c index 98cf073..dfbc782 100644 --- a/nss/tst-nss-static.c +++ b/nss/tst-nss-static.c @@ -1,7 +1,6 @@ /* glibc test for static NSS. */ #include -#define TEST_FUNCTION do_test () static int do_test (void) { @@ -12,4 +11,4 @@ do_test (void) } -#include "../test-skeleton.c" +#include diff --git a/nss/tst-nss-test1.c b/nss/tst-nss-test1.c index c5750e0..65b7b34 100644 --- a/nss/tst-nss-test1.c +++ b/nss/tst-nss-test1.c @@ -1,3 +1,21 @@ +/* Test for NSS configure lookup. + Copyright (C) 2010-2017 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + #include #include #include @@ -68,5 +86,4 @@ do_test (void) return retval; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include diff --git a/pwd/tst-getpw.c b/pwd/tst-getpw.c index c90c4ed..7c00be4 100644 --- a/pwd/tst-getpw.c +++ b/pwd/tst-getpw.c @@ -110,5 +110,4 @@ do_test (void) return errors; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include diff --git a/pwd/tst-putpwent.c b/pwd/tst-putpwent.c index 7eafd0e..696fbf1 100644 --- a/pwd/tst-putpwent.c +++ b/pwd/tst-putpwent.c @@ -164,5 +164,4 @@ do_test (void) return errors > 0; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include diff --git a/resolv/tst-aton.c b/resolv/tst-aton.c index 08110a0..f55dda3 100644 --- a/resolv/tst-aton.c +++ b/resolv/tst-aton.c @@ -73,5 +73,4 @@ do_test (void) return result; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include diff --git a/resolv/tst-inet_ntop.c b/resolv/tst-inet_ntop.c index f0de063..1a99bf6 100644 --- a/resolv/tst-inet_ntop.c +++ b/resolv/tst-inet_ntop.c @@ -110,5 +110,4 @@ do_test (void) return result; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include diff --git a/resolv/tst-leaks.c b/resolv/tst-leaks.c index 4f64535..c49d8c6 100644 --- a/resolv/tst-leaks.c +++ b/resolv/tst-leaks.c @@ -21,15 +21,10 @@ #include #include -/* Prototype for our test function. */ -extern int do_test (int argc, char *argv[]); - -/* This defines the `main' function and some more. */ #define TIMEOUT 40 -#include int -do_test (int argc, char *argv[]) +do_test (void) { unsigned char buf[256]; @@ -41,3 +36,5 @@ do_test (int argc, char *argv[]) return 0; } + +#include diff --git a/resolv/tst-leaks2.c b/resolv/tst-leaks2.c index 5a68a4c..89a5f78 100644 --- a/resolv/tst-leaks2.c +++ b/resolv/tst-leaks2.c @@ -34,7 +34,6 @@ do_test (void) return 0; } -#define TEST_FUNCTION do_test () #define TIMEOUT 30 /* This defines the `main' function and some more. */ -#include +#include diff --git a/resolv/tst-res_hconf_reorder.c b/resolv/tst-res_hconf_reorder.c index 20e5a5a..fa09e95 100644 --- a/resolv/tst-res_hconf_reorder.c +++ b/resolv/tst-res_hconf_reorder.c @@ -109,5 +109,4 @@ do_test (void) return result; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include diff --git a/shadow/tst-putspent.c b/shadow/tst-putspent.c index cbc2c1e..a5b164c 100644 --- a/shadow/tst-putspent.c +++ b/shadow/tst-putspent.c @@ -160,5 +160,4 @@ do_test (void) return errors; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include diff --git a/shadow/tst-shadow.c b/shadow/tst-shadow.c index 48f7167..7ce7462 100644 --- a/shadow/tst-shadow.c +++ b/shadow/tst-shadow.c @@ -80,5 +80,4 @@ do_test (void) return result; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include