From 8655cb55ec4eca5bc260d7049b03ef3a96a21c13 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Tue, 5 Jan 2016 22:41:28 +0000 Subject: [PATCH] tests/fstatat.c: use libtests * tests/fstatat.c: Use SKIP_MAIN_UNDEFINED. --- tests/fstatat.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/fstatat.c b/tests/fstatat.c index 5c08a787..ff476011 100644 --- a/tests/fstatat.c +++ b/tests/fstatat.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 @@ -25,15 +25,19 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef HAVE_FSTATAT -# undef TEST_SYSCALL_NAME -#endif +#ifdef HAVE_FSTATAT -#define TEST_SYSCALL_INVOKE(sample, pst) \ +# define TEST_SYSCALL_INVOKE(sample, pst) \ fstatat(AT_FDCWD, sample, pst, AT_SYMLINK_NOFOLLOW) -#define PRINT_SYSCALL_HEADER(sample) \ +# define PRINT_SYSCALL_HEADER(sample) \ printf("%s(AT_FDCWD, \"%s\", ", TEST_SYSCALL_STR, sample) -#define PRINT_SYSCALL_FOOTER \ +# define PRINT_SYSCALL_FOOTER \ puts(", AT_SYMLINK_NOFOLLOW) = 0") -#include "xstatx.c" +# include "xstatx.c" + +#else + +SKIP_MAIN_UNDEFINED("HAVE_FSTATAT") + +#endif -- 2.40.0