From: Dmitry V. Levin Date: Wed, 6 Jan 2016 15:58:14 +0000 (+0000) Subject: tests/uid32.c: use libtests X-Git-Tag: v4.12~681 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6feccf199ee47de72f6b5eaead5f14527948b887;p=strace tests/uid32.c: use libtests * tests/uid32.c: Use SKIP_MAIN_UNDEFINED. --- 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 -}