tests: extend test coverage of setuid32 syscall
* tests/setuid32.c: New file.
* tests/setuid32.test: New test.
* tests/.gitignore: Add setuid32.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add setuid32.test.
diff --git a/tests/.gitignore b/tests/.gitignore
index 60141d9..3c37023 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -144,6 +144,7 @@
set_ptracer_any
sethostname
setuid
+setuid32
shmxt
sigaction
sigaltstack
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 854d182..592c2b7 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -194,6 +194,7 @@
set_ptracer_any \
sethostname \
setuid \
+ setuid32 \
shmxt \
sigaction \
sigaltstack \
@@ -402,6 +403,7 @@
sendfile64.test \
sethostname.test \
setuid.test \
+ setuid32.test \
shmxt.test \
sigaction.test \
sigaltstack.test \
diff --git a/tests/setuid32.c b/tests/setuid32.c
new file mode 100644
index 0000000..9247cb2
--- /dev/null
+++ b/tests/setuid32.c
@@ -0,0 +1,17 @@
+#include "tests.h"
+#include <sys/syscall.h>
+
+#ifdef __NR_setuid32
+
+# define SYSCALL_NR __NR_setuid32
+# define SYSCALL_NAME "setuid32"
+# define UGID_TYPE int
+# define GETUGID geteuid()
+# define CHECK_OVERFLOWUGID(arg)
+# include "setugid.c"
+
+#else
+
+SKIP_MAIN_UNDEFINED("__NR_setuid32")
+
+#endif
diff --git a/tests/setuid32.test b/tests/setuid32.test
new file mode 100755
index 0000000..7998392
--- /dev/null
+++ b/tests/setuid32.test
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# Check setuid32 syscall decoding.
+
+. "${srcdir=.}/init.sh"
+run_strace_match_diff -a12