tests: add a test for select syscall decoding

Convert test/select.c into a regular test.

* test/Makefile (PROGS): Remove select.
* test/.gitignore: Likewise.
* test/select.c: Rewrite to ...
* tests/select.c: ... new file.
* tests/select.awk: New file.
* tests/select.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add select.
(TESTS): Add select.test.
(EXTRA_DIST): Add select.awk.
* tests/.gitignore: Add select.
diff --git a/tests/select.test b/tests/select.test
new file mode 100755
index 0000000..339a8e4
--- /dev/null
+++ b/tests/select.test
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+# Check select syscall decoding.
+
+. "${srcdir=.}/init.sh"
+
+check_prog awk
+
+./select ||
+	framework_skip_ 'select syscall does not behave as expected'
+
+args="-eselect ./select"
+$STRACE -o "$LOG" $args || {
+	cat "$LOG"
+	fail_ "$STRACE $args failed"
+}
+
+awk -f "$srcdir"/select.awk "$LOG" || {
+	cat "$LOG"
+	fail_ 'unexpected output'
+}
+
+exit 0