mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-06 20:58:33 +01:00
Fix tst-aarch64-pkey to handle ENOSPC as not supported
The syscall pkey_alloc can return ENOSPC to indicate either that all keys are in use or that the system runs in a mode in which memory protection keys are disabled. In such case the test should not fail and just return unsupported. This matches the behaviour of the generic tst-pkey. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> Reviewed-by: Florian Weimer <fweimer@redhat.com>
This commit is contained in:
parent
1b6f868625
commit
60f2d6be65
1 changed files with 4 additions and 0 deletions
|
@ -55,6 +55,10 @@ do_test (void)
|
|||
if (errno == ENOSYS || errno == EINVAL)
|
||||
FAIL_UNSUPPORTED
|
||||
("kernel or CPU does not support memory protection keys");
|
||||
if (errno == ENOSPC)
|
||||
FAIL_UNSUPPORTED
|
||||
("no keys available or kernel does not support memory"
|
||||
" protection keys");
|
||||
FAIL_EXIT1 ("pkey_alloc: %m");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue