diff options
| author | Aurelien Jarno <aurelien@aurel32.net> | 2025-02-15 11:08:33 +0100 |
|---|---|---|
| committer | Aurelien Jarno <aurelien@aurel32.net> | 2025-02-15 11:08:43 +0100 |
| commit | 60f2d6be657aa8c663ee14bd266d343ae0f35afb (patch) | |
| tree | 9d07a58505eb0545a89b3ebab6457cd52b1f4480 | |
| parent | 1b6f868625403d6b7683af840e87d2b18d5d7731 (diff) | |
| download | glibc-60f2d6be657aa8c663ee14bd266d343ae0f35afb.tar.xz glibc-60f2d6be657aa8c663ee14bd266d343ae0f35afb.zip | |
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>
| -rw-r--r-- | sysdeps/unix/sysv/linux/aarch64/tst-aarch64-pkey.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/aarch64/tst-aarch64-pkey.c b/sysdeps/unix/sysv/linux/aarch64/tst-aarch64-pkey.c index 3ff33ef72a..c884efc3b4 100644 --- a/sysdeps/unix/sysv/linux/aarch64/tst-aarch64-pkey.c +++ b/sysdeps/unix/sysv/linux/aarch64/tst-aarch64-pkey.c @@ -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"); } |
