aboutsummaryrefslogtreecommitdiff
path: root/nss/tst-nss-getpwent.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2017-08-17 17:58:25 -0400
committerDJ Delorie <dj@redhat.com>2017-08-17 18:00:51 -0400
commita3fe6a20bf81ef6a97a761dac9050517e7fd7a1f (patch)
treec25c69106d240af6ba39471fab71e61cd512a1b3 /nss/tst-nss-getpwent.c
parentc22845744cd931267e0d7cb2e2b35a0da9c9510a (diff)
downloadglibc-a3fe6a20bf81ef6a97a761dac9050517e7fd7a1f.tar
glibc-a3fe6a20bf81ef6a97a761dac9050517e7fd7a1f.tar.gz
glibc-a3fe6a20bf81ef6a97a761dac9050517e7fd7a1f.tar.bz2
glibc-a3fe6a20bf81ef6a97a761dac9050517e7fd7a1f.zip
Update nss tests to new skeleton
* bug17079.c: Update to new test harness. * test-digits-dots.c: Likewise. * test-netdb.c: Likewise. * tst-field.c: Likewise. * tst-nss-getpwent.c: Likewise. * tst-nss-static.c: Likewise. * tst-nss-test1.c: Likewise. * tst-nss-test2.c: Likewise. * tst-nss-test3.c: Likewise. * tst-nss-test4.c: Likewise. * tst-nss-test5.c: Likewise.
Diffstat (limited to 'nss/tst-nss-getpwent.c')
-rw-r--r--nss/tst-nss-getpwent.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/nss/tst-nss-getpwent.c b/nss/tst-nss-getpwent.c
index 7bd69fc378..3d4dbe525b 100644
--- a/nss/tst-nss-getpwent.c
+++ b/nss/tst-nss-getpwent.c
@@ -21,6 +21,8 @@
#include <stdlib.h>
#include <string.h>
+#include <support/support.h>
+
int
do_test (void)
{
@@ -37,22 +39,12 @@ do_test (void)
{
if (first_name == NULL)
{
- first_name = strdup (pw->pw_name);
- if (first_name == NULL)
- {
- printf ("strdup: %m\n");
- return 1;
- }
+ first_name = xstrdup (pw->pw_name);
first_uid = pw->pw_uid;
}
free (last_name);
- last_name = strdup (pw->pw_name);
- if (last_name == NULL)
- {
- printf ("strdup: %m\n");
- return 1;
- }
+ last_name = xstrdup (pw->pw_name);
last_uid = pw->pw_uid;
++count;
}
@@ -115,5 +107,4 @@ do_test (void)
}
#define TIMEOUT 300
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>