From 2e00fe9155302c073f60dda65330f5686a052c2e Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Wed, 6 Jan 2016 12:03:37 +0000 Subject: [PATCH] tests/getdents64.c: use libtests * tests/getdents64.c: Use SKIP_MAIN_UNDEFINED. (main): Use perror_msg_and_skip. --- tests/getdents64.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/tests/getdents64.c b/tests/getdents64.c index 6e2b2577..7077d9c7 100644 --- a/tests/getdents64.c +++ b/tests/getdents64.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Dmitry V. Levin + * Copyright (c) 2015-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -30,14 +30,14 @@ #ifdef __NR_getdents64 -#include -#include -#include -#include -#include -#include -#include -#include +# include +# include +# include +# include +# include +# include +# include +# include static const char fname[] = "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" @@ -116,7 +116,7 @@ main(int ac, const char **av) int i; if (rc < 0) - return 77; + perror_msg_and_skip("getdents64"); printf("getdents64(0, ["); for (i = 0; i < rc; i += d->d_reclen) { d = (kernel_dirent64 *) &buf[i]; @@ -137,10 +137,6 @@ main(int ac, const char **av) #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_getdents64") #endif -- 2.40.0