summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/sanitizer_common/TestCases/Linux/sched_getparam.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/test/sanitizer_common/TestCases/Linux/sched_getparam.cpp')
-rw-r--r--compiler-rt/test/sanitizer_common/TestCases/Linux/sched_getparam.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/compiler-rt/test/sanitizer_common/TestCases/Linux/sched_getparam.cpp b/compiler-rt/test/sanitizer_common/TestCases/Linux/sched_getparam.cpp
new file mode 100644
index 00000000000..390c656fe20
--- /dev/null
+++ b/compiler-rt/test/sanitizer_common/TestCases/Linux/sched_getparam.cpp
@@ -0,0 +1,13 @@
+// RUN: %clangxx -O0 %s -o %t && %run %t
+
+#include <assert.h>
+#include <sched.h>
+#include <stdio.h>
+
+int main(void) {
+ struct sched_param param;
+ int res = sched_getparam(0, &param);
+ assert(res == 0);
+ if (param.sched_priority == 42) printf(".\n");
+ return 0;
+}
OpenPOWER on IntegriCloud