With linux kernels older than v3.9-rc1, compat rt_sigpending syscall
could fail with EFAULT in cases where on later kernels it succeeds.
Adjust the test to handle both cases properly.
* tests/rt_sigpending.c (iterate): Stop iterations if rt_sigpending
failed with EFAULT.
iterate(const char *const text, unsigned int size, void *set)
{
for (;;) {
- if (k_sigpending(set, size))
- perror_msg_and_fail("rt_sigpending");
+ if (k_sigpending(set, size)) {
+ tprintf("rt_sigpending(%p, %u) = -1 EFAULT (%m)\n",
+ set, size);
+ break;
+ }
if (size) {
#if WORDS_BIGENDIAN
if (size < sizeof(long))