tests: add sched_yield.test

* tests/sched_yield.c: New file.
* tests/sched_yield.test: New test.
* tests/.gitignore: Add sched_yield.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add sched_yield.test.
diff --git a/tests/.gitignore b/tests/.gitignore
index 4d1d8cb..4eb3f49 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -162,6 +162,7 @@
 sched_xetattr
 sched_xetparam
 sched_xetscheduler
+sched_yield
 scm_rights
 seccomp-filter
 seccomp-filter-v
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9f1f8b4..1e11db8 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -214,6 +214,7 @@
 	sched_xetattr \
 	sched_xetparam \
 	sched_xetscheduler \
+	sched_yield \
 	scm_rights \
 	seccomp-filter \
 	seccomp-filter-v \
@@ -472,6 +473,7 @@
 	sched_xetattr.test \
 	sched_xetparam.test \
 	sched_xetscheduler.test \
+	sched_yield.test \
 	scm_rights-fd.test \
 	seccomp-filter-v.test \
 	seccomp-filter.test \
diff --git a/tests/sched_yield.c b/tests/sched_yield.c
new file mode 100644
index 0000000..ed25722
--- /dev/null
+++ b/tests/sched_yield.c
@@ -0,0 +1,22 @@
+#include "tests.h"
+#include <sys/syscall.h>
+
+#ifdef __NR_sched_yield
+
+# include <stdio.h>
+# include <unistd.h>
+
+int
+main(void)
+{
+	printf("sched_yield() = %ld\n", syscall(__NR_sched_yield));
+
+	puts("+++ exited with 0 +++");
+	return 0;
+}
+
+#else
+
+SKIP_MAIN_UNDEFINED("__NR_sched_yield")
+
+#endif
diff --git a/tests/sched_yield.test b/tests/sched_yield.test
new file mode 100755
index 0000000..f0c2c30
--- /dev/null
+++ b/tests/sched_yield.test
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# Check sched_yield syscall decoding.
+
+. "${srcdir=.}/init.sh"
+run_strace_match_diff -a14