public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/1] fanotify.h: Include <linux/types.h>
@ 2023-01-25 23:27 Petr Vorel
  2023-01-25 23:28 ` Petr Vorel
  2023-01-26 10:26 ` Cyril Hrubis
  0 siblings, 2 replies; 5+ messages in thread
From: Petr Vorel @ 2023-01-25 23:27 UTC (permalink / raw)
  To: ltp; +Cc: Gabriel Krisman Bertazi, Richard Palethorpe

to add kernel types (__s32, __u32, ...).

This fixes build on various Buildroot toolchains:

In file included from fanotify.h:14,
                 from fanotify04.c:25:
../../../../include/lapi/fanotify.h:198:2: error: unknown type name ‘__s32’
  198 |  __s32 error;
      |  ^~~~~
../../../../include/lapi/fanotify.h:199:2: error: unknown type name ‘__u32’
  199 |  __u32 error_count;
      |  ^~~~~

NOTE: Historically we tried to minimize number of linux includes,
because it would often lead to broken builds. Headers got better over
time and LTP also dropped support for archaic kernels over time.
Therefore we can keep original kernel types here.

Fixes: 67069fc46a ("syscalls/fanotify22: Validate the generic error info")

Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
---
 testcases/kernel/syscalls/fanotify/fanotify.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/testcases/kernel/syscalls/fanotify/fanotify.h b/testcases/kernel/syscalls/fanotify/fanotify.h
index 51078103eb..da78788378 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify.h
+++ b/testcases/kernel/syscalls/fanotify/fanotify.h
@@ -11,6 +11,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <errno.h>
+#include <linux/types.h>
 #include "lapi/fanotify.h"
 #include "lapi/fcntl.h"
 
-- 
2.39.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [LTP] [PATCH 1/1] fanotify.h: Include <linux/types.h>
  2023-01-25 23:27 [LTP] [PATCH 1/1] fanotify.h: Include <linux/types.h> Petr Vorel
@ 2023-01-25 23:28 ` Petr Vorel
  2023-01-26 10:26 ` Cyril Hrubis
  1 sibling, 0 replies; 5+ messages in thread
From: Petr Vorel @ 2023-01-25 23:28 UTC (permalink / raw)
  To: ltp; +Cc: Gabriel Krisman Bertazi, Richard Palethorpe

Hi,

Cc Jan, which replied to my question in private mail.

Kind regards,
Petr

> to add kernel types (__s32, __u32, ...).

> This fixes build on various Buildroot toolchains:

> In file included from fanotify.h:14,
>                  from fanotify04.c:25:
> ../../../../include/lapi/fanotify.h:198:2: error: unknown type name ‘__s32’
>   198 |  __s32 error;
>       |  ^~~~~
> ../../../../include/lapi/fanotify.h:199:2: error: unknown type name ‘__u32’
>   199 |  __u32 error_count;
>       |  ^~~~~

> NOTE: Historically we tried to minimize number of linux includes,
> because it would often lead to broken builds. Headers got better over
> time and LTP also dropped support for archaic kernels over time.
> Therefore we can keep original kernel types here.

> Fixes: 67069fc46a ("syscalls/fanotify22: Validate the generic error info")

> Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
> ---
>  testcases/kernel/syscalls/fanotify/fanotify.h | 1 +
>  1 file changed, 1 insertion(+)

> diff --git a/testcases/kernel/syscalls/fanotify/fanotify.h b/testcases/kernel/syscalls/fanotify/fanotify.h
> index 51078103eb..da78788378 100644
> --- a/testcases/kernel/syscalls/fanotify/fanotify.h
> +++ b/testcases/kernel/syscalls/fanotify/fanotify.h
> @@ -11,6 +11,7 @@
>  #include <sys/types.h>
>  #include <sys/stat.h>
>  #include <errno.h>
> +#include <linux/types.h>
>  #include "lapi/fanotify.h"
>  #include "lapi/fcntl.h"

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LTP] [PATCH 1/1] fanotify.h: Include <linux/types.h>
  2023-01-25 23:27 [LTP] [PATCH 1/1] fanotify.h: Include <linux/types.h> Petr Vorel
  2023-01-25 23:28 ` Petr Vorel
@ 2023-01-26 10:26 ` Cyril Hrubis
  2023-01-26 10:39   ` Petr Vorel
  1 sibling, 1 reply; 5+ messages in thread
From: Cyril Hrubis @ 2023-01-26 10:26 UTC (permalink / raw)
  To: Petr Vorel; +Cc: Gabriel Krisman Bertazi, Richard Palethorpe, ltp

Hi!
> to add kernel types (__s32, __u32, ...).
> 
> This fixes build on various Buildroot toolchains:
> 
> In file included from fanotify.h:14,
>                  from fanotify04.c:25:
> ../../../../include/lapi/fanotify.h:198:2: error: unknown type name ‘__s32’
>   198 |  __s32 error;
>       |  ^~~~~
> ../../../../include/lapi/fanotify.h:199:2: error: unknown type name ‘__u32’
>   199 |  __u32 error_count;
>       |  ^~~~~
> 
> NOTE: Historically we tried to minimize number of linux includes,
> because it would often lead to broken builds. Headers got better over
> time and LTP also dropped support for archaic kernels over time.
> Therefore we can keep original kernel types here.
> 
> Fixes: 67069fc46a ("syscalls/fanotify22: Validate the generic error info")
> 
> Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
> ---
>  testcases/kernel/syscalls/fanotify/fanotify.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/testcases/kernel/syscalls/fanotify/fanotify.h b/testcases/kernel/syscalls/fanotify/fanotify.h
> index 51078103eb..da78788378 100644
> --- a/testcases/kernel/syscalls/fanotify/fanotify.h
> +++ b/testcases/kernel/syscalls/fanotify/fanotify.h
> @@ -11,6 +11,7 @@
>  #include <sys/types.h>
>  #include <sys/stat.h>
>  #include <errno.h>
> +#include <linux/types.h>

Shouldn't that go into the lapi/fanotify.h instead? Otherwise the next
file that includes the header will have the exactly same problem.

>  #include "lapi/fanotify.h"
>  #include "lapi/fcntl.h"
>  
> -- 
> 2.39.1
> 

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LTP] [PATCH 1/1] fanotify.h: Include <linux/types.h>
  2023-01-26 10:26 ` Cyril Hrubis
@ 2023-01-26 10:39   ` Petr Vorel
  2023-01-26 10:49     ` Petr Vorel
  0 siblings, 1 reply; 5+ messages in thread
From: Petr Vorel @ 2023-01-26 10:39 UTC (permalink / raw)
  To: Cyril Hrubis; +Cc: Gabriel Krisman Bertazi, Richard Palethorpe, ltp

> Hi!
> > to add kernel types (__s32, __u32, ...).

> > This fixes build on various Buildroot toolchains:

> > In file included from fanotify.h:14,
> >                  from fanotify04.c:25:
> > ../../../../include/lapi/fanotify.h:198:2: error: unknown type name ‘__s32’
> >   198 |  __s32 error;
> >       |  ^~~~~
> > ../../../../include/lapi/fanotify.h:199:2: error: unknown type name ‘__u32’
> >   199 |  __u32 error_count;
> >       |  ^~~~~

> > NOTE: Historically we tried to minimize number of linux includes,
> > because it would often lead to broken builds. Headers got better over
> > time and LTP also dropped support for archaic kernels over time.
> > Therefore we can keep original kernel types here.

> > Fixes: 67069fc46a ("syscalls/fanotify22: Validate the generic error info")

> > Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
> > ---
> >  testcases/kernel/syscalls/fanotify/fanotify.h | 1 +
> >  1 file changed, 1 insertion(+)

> > diff --git a/testcases/kernel/syscalls/fanotify/fanotify.h b/testcases/kernel/syscalls/fanotify/fanotify.h
> > index 51078103eb..da78788378 100644
> > --- a/testcases/kernel/syscalls/fanotify/fanotify.h
> > +++ b/testcases/kernel/syscalls/fanotify/fanotify.h
> > @@ -11,6 +11,7 @@
> >  #include <sys/types.h>
> >  #include <sys/stat.h>
> >  #include <errno.h>
> > +#include <linux/types.h>

> Shouldn't that go into the lapi/fanotify.h instead? Otherwise the next
> file that includes the header will have the exactly same problem.

Ah yes, you're right, I don't know myself why I put it that into the other one.

Kind regards,
Petr

> >  #include "lapi/fanotify.h"
> >  #include "lapi/fcntl.h"

> > -- 
> > 2.39.1

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LTP] [PATCH 1/1] fanotify.h: Include <linux/types.h>
  2023-01-26 10:39   ` Petr Vorel
@ 2023-01-26 10:49     ` Petr Vorel
  0 siblings, 0 replies; 5+ messages in thread
From: Petr Vorel @ 2023-01-26 10:49 UTC (permalink / raw)
  To: Cyril Hrubis, ltp, Richard Palethorpe, Gabriel Krisman Bertazi,
	Petr Vorel

Hi all,

merged with change that header was added to fanotify.h in lapi
(pointed out by Cyril).

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-01-26 10:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-25 23:27 [LTP] [PATCH 1/1] fanotify.h: Include <linux/types.h> Petr Vorel
2023-01-25 23:28 ` Petr Vorel
2023-01-26 10:26 ` Cyril Hrubis
2023-01-26 10:39   ` Petr Vorel
2023-01-26 10:49     ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox