selftests/seccomp: Accept any valid fd in user_notification_addfd
authorSeth Forshee <seth.forshee@canonical.com>
Thu, 28 Jan 2021 16:17:21 +0000 (10:17 -0600)
committerShuah Khan <skhan@linuxfoundation.org>
Wed, 10 Feb 2021 00:39:01 +0000 (17:39 -0700)
commite0c0840a46db9d50ba7391082d665d74f320c39f
treeeb19e7d09f8c5da51a00f7e32303a6cc097068bc
parent1602a31d71d3607f3f1dc08692aad7105ca80e5b
selftests/seccomp: Accept any valid fd in user_notification_addfd

This test expects fds to have specific values, which works fine
when the test is run standalone. However, the kselftest runner
consumes a couple of extra fds for redirection when running
tests, so the test fails when run via kselftest.

Change the test to pass on any valid fd number.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/seccomp/seccomp_bpf.c