Fix tst-pkey.c pkey_alloc return checks and manual
authorLucas A. M. Magalhaes <lamm@linux.ibm.com>
Thu, 16 Jan 2020 13:39:12 +0000 (10:39 -0300)
committerTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Fri, 17 Jan 2020 12:05:03 +0000 (09:05 -0300)
commit70ba28f7ab2923d4e36ffc9d5d2e32357353b25c
treea372da0bc6f7aefadc7b069e40a577e923c1034a
parent18363b4f010da9ba459b13310b113ac0647c2fcc
Fix tst-pkey.c pkey_alloc return checks and manual

This test was failing in some powerpc systems as it was not checking
for ENOSPC return.

As said on the Linux man-pages and can be observed by the implementation
at mm/mprotect.c in the Linux Kernel source.  The syscall pkey_alloc can
return EINVAL or ENOSPC.  ENOSPC will indicate either that all keys are
in use or that the kernel does not support pkeys.

Reviewed-by: Gabriel F. T. Gomes <gabriel@inconstante.net.br>
manual/memory.texi
sysdeps/unix/sysv/linux/tst-pkey.c