diff options
author | Dmitry V. Levin <ldv@strace.io> | 2021-06-02 09:23:00 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2021-06-02 09:23:00 +0000 |
commit | 846e88a8bed0f218c24c4e1160f9da8d742e6019 (patch) | |
tree | b0511876d7bb31d7c2db4724805533c37a34d5b2 | |
parent | b62286fbe36f430ce84ae7fe330d40659c5902ed (diff) | |
download | strace-846e88a8bed0f218c24c4e1160f9da8d742e6019.tar.gz |
tests: assume __NR_setregid is defined
setregid syscall entries are present in syscallent files for all
supported architectures.
* tests/setregid.c: Assume __NR_setregid is defined.
-rw-r--r-- | tests/setregid.c | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/tests/setregid.c b/tests/setregid.c index 232a140ab..3afdb9205 100644 --- a/tests/setregid.c +++ b/tests/setregid.c @@ -1,4 +1,6 @@ /* + * Check decoding of setregid syscall. + * * Copyright (c) 2016-2019 The strace developers. * All rights reserved. * @@ -8,25 +10,17 @@ #include "tests.h" #include "scno.h" -#ifdef __NR_setregid - -# define SYSCALL_NR __NR_setregid -# define SYSCALL_NAME "setregid" - -# if defined __NR_setregid32 && __NR_setregid != __NR_setregid32 -# define UGID_TYPE short -# define GETUGID syscall(__NR_getegid) -# define CHECK_OVERFLOWUGID(arg) check_overflowgid(arg) -# else -# define UGID_TYPE int -# define GETUGID getegid() -# define CHECK_OVERFLOWUGID(arg) -# endif - -# include "setreugid.c" +#define SYSCALL_NR __NR_setregid +#define SYSCALL_NAME "setregid" +#if defined __NR_setregid32 && __NR_setregid != __NR_setregid32 +# define UGID_TYPE short +# define GETUGID syscall(__NR_getegid) +# define CHECK_OVERFLOWUGID(arg) check_overflowgid(arg) #else - -SKIP_MAIN_UNDEFINED("__NR_setregid") - +# define UGID_TYPE int +# define GETUGID getegid() +# define CHECK_OVERFLOWUGID(arg) #endif + +#include "setreugid.c" |