mirror of
https://sourceware.org/git/glibc.git
synced 2025-10-12 19:04:54 +03: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:
@@ -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");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user