Thread (4 messages) 4 messages, 3 authors, 2021-11-26

Re: [PATCH] selftests/seccomp: fix check of fds being assigned

From: Christian Brauner <hidden>
Date: 2021-11-16 09:33:22
Also in: bpf, linux-kselftest, lkml

On Mon, Nov 15, 2021 at 05:52:27PM +0100, Andrea Righi wrote:
There might be an arbitrary free open fd slot when we run the addfd
sub-test, so checking for progressive numbers of file descriptors
starting from memfd is not always a reliable check and we could get the
following failure:

  #  RUN           global.user_notification_addfd ...
  # seccomp_bpf.c:3989:user_notification_addfd:Expected listener (18) == nextfd++ (9)
  # user_notification_addfd: Test terminated by assertion

Simply check if memfd and listener are valid file descriptors and start
counting for progressive file checking with the listener fd.

Fixes: 93e720d710df ("selftests/seccomp: More closely track fds being assigned")
Signed-off-by: Andrea Righi <redacted>
---
Thanks!
Acked-by: Christian Brauner <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help