Re: [LTP] [PATCH v2 1/7] Add fallback definitions for lapi/fs.h

Petr Vorel
2024-07-25T12:55:42Z

Hi all,

...
> > #include "config.h"
> > -#ifndef HAVE_MOUNT_SETATTR
> > -# ifdef HAVE_LINUX_FS_H
> > -# include <linux/fs.h>
> > -# endif
> > +
> > +#ifdef HAVE_LINUX_FS_H
> > +# include <linux/fs.h>
> > #endif

> > #include <sys/user.h>

> > @Li do we still need that ifdef or can we get rid of it?

> Theoretically, we can remove it because that problem is addressed in
> Glibc-2.37 by:

> https://github.com/kraj/glibc/commit/774058d72942249f71d74e7f2b639f77184160a6

> It is essentially a glibc bug we don't need to fix that in LTP.

> We ever discussed in
> https://lists.linux.it/pipermail/ltp/2023-March/033138.html

> However, if we want LTP could be built with all the middle glibc versions
> (2.22 < glibc < 2.36)
> this might be thinking over. Because we announce support the minimal
> glibc-version is 2.22.

Hm, it makes sense to keep it. But nobody will remember once we raise the
support.

Also, removing HAVE_LINUX_FS_H [1] works in the CI [2], including distros with
glibc 2.36 (minimal build [3] or all cross-compile builds, e.g. [4]).

I wonder how realistic is that somebody is still affected by this issue.

Kind regards,
Petr

[1] https://github.com/linux-test-project/ltp/commit/4bc155448559bc2ff75381c0e04662d585677bc4
[2] https://github.com/pevik/ltp/actions/runs/10093238273
[3] https://github.com/pevik/ltp/actions/runs/10093238273/job/27908521308
[4] https://github.com/pevik/ltp/actions/runs/10093238273/job/27908520925