[RFC PATCH 1/5] landlock/selftests: add a missing close(srv_fd) call

Mickaël Salaün mic at digikod.net
Fri Jan 9 10:49:48 UTC 2026


On Fri, Jan 09, 2026 at 11:41:30AM +0100, Mickaël Salaün wrote:
> Good, I'll pick that in my -next branch.
> 
> Nit: The prefix should be "selftests/landlock"
> 
> On Thu, Jan 01, 2026 at 02:40:58PM +0100, Günther Noack wrote:
> > Signed-off-by: Günther Noack <gnoack3000 at gmail.com>
> > ---
> >  tools/testing/selftests/landlock/fs_test.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/tools/testing/selftests/landlock/fs_test.c b/tools/testing/selftests/landlock/fs_test.c
> > index 37a5a3df712ec..16503f2e6a481 100644
> > --- a/tools/testing/selftests/landlock/fs_test.c
> > +++ b/tools/testing/selftests/landlock/fs_test.c
> > @@ -4400,6 +4400,7 @@ TEST_F_FORK(layout1, named_unix_domain_socket_ioctl)
> >  	EXPECT_EQ(0, test_fionread_ioctl(cli_fd));
> >  
> >  	ASSERT_EQ(0, close(cli_fd));
> > +	ASSERT_EQ(0, close(srv_fd));

I'll also replace these ASSERT_EQ() with EXPECT_EQ().

> >  }
> >  
> >  /* clang-format off */
> > -- 
> > 2.52.0
> > 
> > 



More information about the Linux-security-module-archive mailing list