[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:
Ulrich Weigand 2022-04-21 19:31:04 +02:00
parent d133538b8b
commit e4085a012c
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}