diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2015-01-22 14:03:07 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2015-01-22 14:03:07 +0000 |
commit | f3f47bf2a5f3e9da4d6c6a5aed54e4ebac4f92ca (patch) | |
tree | ea57ac0a655eb9f8d7c11884a3a535bf9b393157 /test | |
parent | bdf5a2733f2e2278b93bc0924b9717b23ddc9bf9 (diff) |
[sanitizer] Intercept sched_getparam.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@226827 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/sanitizer_common/TestCases/sched_getparam.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/sanitizer_common/TestCases/sched_getparam.cc b/test/sanitizer_common/TestCases/sched_getparam.cc new file mode 100644 index 000000000..390c656fe --- /dev/null +++ b/test/sanitizer_common/TestCases/sched_getparam.cc @@ -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, ¶m); + assert(res == 0); + if (param.sched_priority == 42) printf(".\n"); + return 0; +} |