mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-06 20:58:33 +01:00
linux: Also check pkey_get for ENOSYS on tst-pkey (BZ 31996)
The powerpc pkey_get/pkey_set support was only added for 64-bit [1], and tst-pkey only checks if the support was present with pkey_alloc (which does not fail on powerpc32, at least running a 64-bit kernel). Checked on powerpc-linux-gnu. [1] https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a803367bab167f5ec4fde1f0d0ec447707c29520 Reviewed-By: Andreas K. Huettel <dilfridge@gentoo.org>
This commit is contained in:
parent
e0f7da7235
commit
6b7e2e1d61
1 changed files with 7 additions and 1 deletions
|
@ -205,7 +205,13 @@ do_test (void)
|
||||||
" protection keys");
|
" protection keys");
|
||||||
FAIL_EXIT1 ("pkey_alloc: %m");
|
FAIL_EXIT1 ("pkey_alloc: %m");
|
||||||
}
|
}
|
||||||
TEST_COMPARE (pkey_get (keys[0]), 0);
|
if (pkey_get (keys[0]) < 0)
|
||||||
|
{
|
||||||
|
if (errno == ENOSYS)
|
||||||
|
FAIL_UNSUPPORTED
|
||||||
|
("glibc does not support memory protection keys");
|
||||||
|
FAIL_EXIT1 ("pkey_alloc: %m");
|
||||||
|
}
|
||||||
for (int i = 1; i < key_count; ++i)
|
for (int i = 1; i < key_count; ++i)
|
||||||
{
|
{
|
||||||
keys[i] = pkey_alloc (0, i);
|
keys[i] = pkey_alloc (0, i);
|
||||||
|
|
Loading…
Add table
Reference in a new issue