mirror of git://sourceware.org/git/glibc.git
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>
(cherry picked from commit 60f2d6be65)
This commit is contained in:
parent
69fda28279
commit
1e0e33e1b1
|
|
@ -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…
Reference in New Issue