* tests/iopl.c: New file.
* tests/iopl.test: New test.
* tests/.gitignore: Add iopl.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add iopl.test.
inet-cmsg
ioctl
ioperm
+iopl
ip_mreq
ipc_msg
ipc_msgbuf
inet-cmsg \
ioctl \
ioperm \
+ iopl \
ip_mreq \
ipc_msg \
ipc_msgbuf \
inet-cmsg.test \
ioctl.test \
ioperm.test \
+ iopl.test \
ip_mreq.test \
ipc_msg.test \
ipc_msgbuf.test \
--- /dev/null
+#include "tests.h"
+#include <sys/syscall.h>
+
+#ifdef __NR_iopl
+
+# include <errno.h>
+# include <stdio.h>
+# include <unistd.h>
+
+int
+main(void)
+{
+ long rc = syscall(__NR_iopl, 4);
+ const char *error_text;
+ switch (errno) {
+ case ENOSYS:
+ error_text = "ENOSYS";
+ break;
+ case EPERM:
+ error_text = "EPERM";
+ break;
+ default:
+ error_text = "EINVAL";
+ }
+ printf("iopl(4) = %ld %s (%m)\n", rc, error_text);
+
+ puts("+++ exited with 0 +++");
+ return 0;
+}
+
+#else
+
+SKIP_MAIN_UNDEFINED("__NR_iopl")
+
+#endif
--- /dev/null
+#!/bin/sh
+
+# Check iopl syscall decoding.
+
+. "${srcdir=.}/init.sh"
+run_strace_match_diff -a8