With the original code, "lsns/filedesc" test case failed on
"build (qemu-user, s390x)" and "build (qemu-user, riscv64)".
On the platforms, lsns_ioctl(fd, NS_GET_{PARENT,USERNS}) failed
with ENOSYS. The error stoped the iteration for gathering
information from /proc/[0-9]+. As a result, lsns printed
nothing. We don't expect this behavior.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
return -errno;
if (strcmp(nsname, "pid") == 0 || strcmp(nsname, "user") == 0) {
if ((pfd = lsns_ioctl(fd, NS_GET_PARENT)) < 0) {
- if (errno == EPERM)
+ if (errno == EPERM
+ /* On the test platforms, "build (qemu-user, s390x)" and
+ * "build (qemu-user, riscv64)", the ioctl reported ENOSYS.
+ */
+ || errno == ENOSYS)
goto user;
close(fd);
return -errno;
}
user:
if ((ofd = lsns_ioctl(fd, NS_GET_USERNS)) < 0) {
- if (errno == EPERM)
+ if (errno == EPERM
+ /* On the test platforms, "build (qemu-user, s390x)" and
+ * "build (qemu-user, riscv64)", the ioctl reported ENOSYS.
+ */
+ || errno == ENOSYS)
goto out;
close(fd);
return -errno;