summaryrefslogtreecommitdiff
path: root/test/sanitizer_common/TestCases/Linux/sched_getparam.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2019-08-05 13:57:03 +0000
committerNico Weber <nicolasweber@gmx.de>2019-08-05 13:57:03 +0000
commit71638dc011521b02024972b12f2dae8ba89001b0 (patch)
tree0af34b7e7c5897557f886c3c348c2cfa98e20a43 /test/sanitizer_common/TestCases/Linux/sched_getparam.cpp
parenta467d95f64447ccbca75f597d23f84f8aee9ea7e (diff)
downloadcompiler-rt-71638dc011521b02024972b12f2dae8ba89001b0.tar.gz
compiler-rt: Rename cc files below test/sanitizer_common to cpp
See r367803 and similar other changes. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@367863 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/sanitizer_common/TestCases/Linux/sched_getparam.cpp')
-rw-r--r--test/sanitizer_common/TestCases/Linux/sched_getparam.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/sanitizer_common/TestCases/Linux/sched_getparam.cpp b/test/sanitizer_common/TestCases/Linux/sched_getparam.cpp
new file mode 100644
index 000000000..390c656fe
--- /dev/null
+++ b/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;
+}