summaryrefslogtreecommitdiff
path: root/tests/getgroups.c
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@strace.io>2021-06-02 08:25:00 +0000
committerDmitry V. Levin <ldv@strace.io>2021-06-02 08:25:00 +0000
commit233f0a0622fb036a5f7c256bb4fac18215d3a360 (patch)
tree33588bf177d3118131fa8102de42f46c87f96d72 /tests/getgroups.c
parentdc42270d3d54b48d8f046cf7964a467a6fb423e8 (diff)
downloadstrace-233f0a0622fb036a5f7c256bb4fac18215d3a360.tar.gz
tests: assume __NR_getgroups is defined
getgroups syscall entries are present in syscallent files for all supported architectures. * tests/getgroups.c: Assume __NR_getgroups is defined.
Diffstat (limited to 'tests/getgroups.c')
-rw-r--r--tests/getgroups.c32
1 files changed, 10 insertions, 22 deletions
diff --git a/tests/getgroups.c b/tests/getgroups.c
index 0316648a2..c4a2c24ce 100644
--- a/tests/getgroups.c
+++ b/tests/getgroups.c
@@ -14,31 +14,25 @@
# define SYSCALL_NAME "getgroups32"
# define GID_TYPE unsigned int
-#else
+#else /* __NR_getgroups */
# include "tests.h"
# include "scno.h"
-# ifdef __NR_getgroups
-
-# define SYSCALL_NR __NR_getgroups
-# define SYSCALL_NAME "getgroups"
-# if defined __NR_getgroups32 && __NR_getgroups != __NR_getgroups32
-# define GID_TYPE unsigned short
-# else
-# define GID_TYPE unsigned int
-# endif
-
+# define SYSCALL_NR __NR_getgroups
+# define SYSCALL_NAME "getgroups"
+# if defined __NR_getgroups32 && __NR_getgroups != __NR_getgroups32
+# define GID_TYPE unsigned short
+# else
+# define GID_TYPE unsigned int
# endif
#endif
-#ifdef GID_TYPE
+#include <stdio.h>
+#include <unistd.h>
-# include <stdio.h>
-# include <unistd.h>
-
-# define MAX_STRLEN 32
+#define MAX_STRLEN 32
static long ngroups;
static void
@@ -108,9 +102,3 @@ main(void)
puts("+++ exited with 0 +++");
return 0;
}
-
-#else
-
-SKIP_MAIN_UNDEFINED("__NR_getgroups")
-
-#endif