From: Dmitry V. Levin Date: Wed, 6 Jan 2016 12:02:55 +0000 (+0000) Subject: tests/getdents.c: use libtests X-Git-Tag: v4.12~688 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=74769e99cda806bea4ae86e65351ddceb34a797e;p=strace tests/getdents.c: use libtests * tests/getdents.c: Use SKIP_MAIN_UNDEFINED. (main): Use perror_msg_and_skip. --- diff --git a/tests/getdents.c b/tests/getdents.c index eee91a97..16541df6 100644 --- a/tests/getdents.c +++ b/tests/getdents.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,15 +30,14 @@ #ifdef __NR_getdents -#include -#include -#include -#include -#include -#include -#include - -#include "kernel_types.h" +# include +# include +# include +# include +# include +# include +# include +# include "kernel_types.h" static const char fname[] = "A\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\nA\n" @@ -112,7 +111,7 @@ main(int ac, const char **av) int i; if (rc < 0) - return 77; + perror_msg_and_skip("getdents"); printf("getdents(0, ["); for (i = 0; i < rc; i += d->d_reclen) { d = (kernel_dirent *) &buf[i]; @@ -133,10 +132,6 @@ main(int ac, const char **av) #else -int -main(void) -{ - return 77; -} +SKIP_MAIN_UNDEFINED("__NR_getdents") #endif