]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: pidfd: skip test if unshare fails with EPERM
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 7 Jul 2020 15:39:27 +0000 (11:39 -0400)
committerShuah Khan <skhan@linuxfoundation.org>
Tue, 7 Jul 2020 19:28:58 +0000 (13:28 -0600)
commitb00d6cda35c163a7fabdec868471e56f2533bcf0
tree0e49672a45956aeb32490cf643a241069e8133be
parent0a2376af1b8198793e833545288be4708ec573b7
selftests: pidfd: skip test if unshare fails with EPERM

Similar to how ENOSYS causes a skip if pidfd_send_signal is not present,
we can do the same for unshare if it fails with EPERM.  This way, running
the test without privileges causes four tests to skip but no early bail out.

Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/pidfd/pidfd_test.c