Re: [PATCH v3 13/14] selftest: fix headers in fclog.c
From: Jori Koolstra
Date: Mon Jul 06 2026 - 17:08:26 EST
> Op 06-07-2026 07:57 CEST schreef NeilBrown <neilb@xxxxxxxxxxx>:
>
>
> On Sun, 05 Jul 2026, Jori Koolstra wrote:
> > Signed-off-by: Jori Koolstra <jkoolstra@xxxxxxxxx>
>
> Maybe say a bit more about what needs fixing?
>
I should really be a bit more explanative, it's a skill I am working on :)
> I guess the ones you removed are already included in
> kselftest_harness.h
>
> and fcntl.h is needed for O_RDONLY etc. Is that all?
> Lots of .c files in tools/testing/selftests include fcntl.h.
> I wonder if it should go in kselftest_harness.h too?
>
Yes. Really it does not belong in this series, so maybe I should drop it
but the filesystems selftests don't compile for me without adding fcntl.h,
and clangd was warning me those other headers were not needed.
Let me take a look at kselftest_harness.h; I like your suggestion and then we
can simply drop this noise from this patchset.
> NeilBrown
>
> > ---
> > tools/testing/selftests/filesystems/fclog.c | 4 +---
> > 1 file changed, 1 insertion`h+), 3 deletions(-)
> >
> > diff --git a/tools/testing/selftests/filesystems/fclog.c b/tools/testing/selftests/filesystems/fclog.c
> > index 551c4a0f395a..593a5136e991 100644
> > --- a/tools/testing/selftests/filesystems/fclog.c
> > +++ b/tools/testing/selftests/filesystems/fclog.c
> > @@ -6,10 +6,8 @@
> >
> > #include <assert.h>
> > #include <errno.h>
> > +#include <fcntl.h>
> > #include <sched.h>
> > -#include <stdio.h>
> > -#include <stdlib.h>
> > -#include <string.h>
> > #include <unistd.h>
> > #include <sys/mount.h>
> >
> > --
> > 2.55.0
> >
> >