* tests/creat.c: New file.
* tests/creat.test: New test.
* tests/.gitignore: Add creat.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add creat.test.
clock_xettime
copy_file_range
count-f
+creat
dup
dup2
dup3
clock_xettime \
copy_file_range \
count-f \
+ creat \
dup \
dup2 \
dup3 \
clock_nanosleep.test \
clock_xettime.test \
copy_file_range.test \
+ creat.test \
dup.test \
dup2.test \
dup3.test \
--- /dev/null
+#include "tests.h"
+#include <sys/syscall.h>
+
+#ifdef __NR_creat
+
+# include <errno.h>
+# include <stdio.h>
+# include <sys/stat.h>
+# include <unistd.h>
+
+# define TMP_FILE "creat"
+
+int
+main(void)
+{
+ int rc = syscall(__NR_creat, TMP_FILE, S_IRUSR);
+ printf("creat(\"%s\", %#o) = %d %s (%m)\n",
+ TMP_FILE, S_IRUSR, rc,
+ errno == ENOSYS ? "ENOSYS" : "ETXTBSY");
+
+ puts("+++ exited with 0 +++");
+ return 0;
+}
+
+#else
+
+SKIP_MAIN_UNDEFINED("__NR_creat")
+
+#endif
--- /dev/null
+#!/bin/sh
+
+# Check creat syscall decoding.
+
+. "${srcdir=.}/init.sh"
+
+run_prog > /dev/null
+OUT="$LOG.out"
+run_strace -ecreat -a21 $args > "$OUT"
+match_diff "$LOG" "$OUT"
+rm -f "$OUT"