From 6feccf199ee47de72f6b5eaead5f14527948b887 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Wed, 6 Jan 2016 15:58:14 +0000 Subject: [PATCH] tests/uid32.c: use libtests * tests/uid32.c: Use SKIP_MAIN_UNDEFINED. --- tests/uid32.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/tests/uid32.c b/tests/uid32.c index 390d623b..9c30d92a 100644 --- a/tests/uid32.c +++ b/tests/uid32.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015 Dmitry V. Levin + * Copyright (c) 2014-2016 Dmitry V. Levin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,14 +26,8 @@ */ #include "tests.h" -#include -#include -#include #include -int -main(void) -{ #if defined(__NR_getuid32) \ && defined(__NR_setuid32) \ && defined(__NR_getresuid32) \ @@ -41,6 +35,14 @@ main(void) && defined(__NR_setresuid32) \ && defined(__NR_fchown32) \ && defined(__NR_getgroups32) + +# include +# include +# include + +int +main(void) +{ int r, e, s; int size; int *list = 0; @@ -55,7 +57,12 @@ main(void) assert(list = calloc(size + 1, sizeof(*list))); assert(syscall(__NR_getgroups32, size, list) == size); return 0; +} + #else - return 77; + +SKIP_MAIN_UNDEFINED("__NR_getuid32 && __NR_setuid32 && __NR_getresuid32" + " && __NR_setreuid32 && __NR_setresuid32" + " && __NR_fchown32 && __NR_getgroups32") + #endif -} -- 2.40.0