summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@strace.io>2021-06-02 09:23:00 +0000
committerDmitry V. Levin <ldv@strace.io>2021-06-02 09:23:00 +0000
commit846e88a8bed0f218c24c4e1160f9da8d742e6019 (patch)
treeb0511876d7bb31d7c2db4724805533c37a34d5b2
parentb62286fbe36f430ce84ae7fe330d40659c5902ed (diff)
downloadstrace-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.c32
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"