forked from OSchip/llvm-project
[sanitizer] Fix prctl unit test on non-SMT systems
On systems where the kernel supports the PR_SCHED_CORE interface, but there is no SMT, the prctl call will set errno to ENODEV, which currently causes the test to fail. Fix by accepting ENODEV in addition to EINVAL.
This commit is contained in:
parent
d133538b8b
commit
e4085a012c
|
@ -22,7 +22,7 @@ int main() {
|
|||
int res;
|
||||
res = prctl(PR_SCHED_CORE, PR_SCHED_CORE_CREATE, 0, 0, 0);
|
||||
if (res < 0) {
|
||||
assert(errno == EINVAL);
|
||||
assert(errno == EINVAL || errno == ENODEV);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue