* [LTP] [PATCH 0/2] fix compiling errors on fedora-rawhide @ 2022-08-05 6:33 Li Wang 2022-08-05 6:34 ` [LTP] [PATCH 1/2] lapi/pidfd: adding pidfd header file Li Wang 2022-08-05 6:34 ` [LTP] [PATCH 2/2] lapi/fsmount: resolve conflict in different header files Li Wang 0 siblings, 2 replies; 8+ messages in thread From: Li Wang @ 2022-08-05 6:33 UTC (permalink / raw) To: ltp CI job: https://github.com/wangli5665/ltp/runs/7686209513 Li Wang (2): lapi/pidfd: adding pidfd header file lapi/fsmount: resolve conflict in different header files configure.ac | 2 ++ include/lapi/fs.h | 6 ++++-- include/lapi/fsmount.h | 6 ++++-- include/lapi/pidfd.h | 3 +++ testcases/kernel/syscalls/fsconfig/fsconfig01.c | 1 + testcases/kernel/syscalls/fsconfig/fsconfig02.c | 1 + testcases/kernel/syscalls/fsmount/fsmount01.c | 1 + testcases/kernel/syscalls/fsmount/fsmount02.c | 1 + testcases/kernel/syscalls/fsopen/fsopen01.c | 1 + testcases/kernel/syscalls/fsopen/fsopen02.c | 1 + testcases/kernel/syscalls/fspick/fspick01.c | 1 + testcases/kernel/syscalls/fspick/fspick02.c | 1 + testcases/kernel/syscalls/mount_setattr/mount_setattr01.c | 1 + testcases/kernel/syscalls/move_mount/move_mount01.c | 1 + testcases/kernel/syscalls/move_mount/move_mount02.c | 1 + testcases/kernel/syscalls/open_tree/open_tree01.c | 1 + testcases/kernel/syscalls/open_tree/open_tree02.c | 1 + 17 files changed, 26 insertions(+), 4 deletions(-) -- 2.35.3 -- Mailing list info: https://lists.linux.it/listinfo/ltp ^ permalink raw reply [flat|nested] 8+ messages in thread
* [LTP] [PATCH 1/2] lapi/pidfd: adding pidfd header file 2022-08-05 6:33 [LTP] [PATCH 0/2] fix compiling errors on fedora-rawhide Li Wang @ 2022-08-05 6:34 ` Li Wang 2022-08-05 7:14 ` Petr Vorel 2022-08-05 6:34 ` [LTP] [PATCH 2/2] lapi/fsmount: resolve conflict in different header files Li Wang 1 sibling, 1 reply; 8+ messages in thread From: Li Wang @ 2022-08-05 6:34 UTC (permalink / raw) To: ltp The newer Glibc already provided wrapper for the series pidfd syscall, so let's include the header file conditionally. # rpm -q glibc-devel glibc-devel-2.35.9000-31.fc37.ppc64le # rpm -ql glibc-devel | grep pidfd /usr/include/sys/pidfd.h To get rid of compiling error from fedora-rawhide: tst_safe_macros.c: In function ‘safe_pidfd_open’: tst_safe_macros.c:135:16: error: implicit declaration of function ‘pidfd_open’ [-Werror=implicit-function-declaration] 135 | rval = pidfd_open(pid, flags); | ^~~~~~~~~~ Signed-off-by: Li Wang <liwang@redhat.com> --- configure.ac | 1 + include/lapi/pidfd.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/configure.ac b/configure.ac index 69b145b5f..d50ec1ea7 100644 --- a/configure.ac +++ b/configure.ac @@ -71,6 +71,7 @@ AC_CHECK_HEADERS_ONCE([ \ sys/epoll.h \ sys/fanotify.h \ sys/inotify.h \ + sys/pidfd.h sys/prctl.h \ sys/shm.h \ sys/timerfd.h \ diff --git a/include/lapi/pidfd.h b/include/lapi/pidfd.h index 244d3acaf..9ca8e5aa2 100644 --- a/include/lapi/pidfd.h +++ b/include/lapi/pidfd.h @@ -8,6 +8,9 @@ #define LAPI_PIDFD_H__ #include <fcntl.h> +#ifdef HAVE_SYS_PIDFD_H +# include <sys/pidfd.h> +#endif #include "config.h" #include "lapi/syscalls.h" -- 2.35.3 -- Mailing list info: https://lists.linux.it/listinfo/ltp ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [LTP] [PATCH 1/2] lapi/pidfd: adding pidfd header file 2022-08-05 6:34 ` [LTP] [PATCH 1/2] lapi/pidfd: adding pidfd header file Li Wang @ 2022-08-05 7:14 ` Petr Vorel 2022-08-05 10:04 ` Li Wang 0 siblings, 1 reply; 8+ messages in thread From: Petr Vorel @ 2022-08-05 7:14 UTC (permalink / raw) To: Li Wang; +Cc: ltp Hi Li, obviously correct, thanks! BTW if you wish to use rawhide in CI, we can give it a try (could be reverted to fedora:latest - i.e. the latest release if got problematic). Kind regards, Petr -- Mailing list info: https://lists.linux.it/listinfo/ltp ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [LTP] [PATCH 1/2] lapi/pidfd: adding pidfd header file 2022-08-05 7:14 ` Petr Vorel @ 2022-08-05 10:04 ` Li Wang 2022-08-05 10:36 ` Petr Vorel 0 siblings, 1 reply; 8+ messages in thread From: Li Wang @ 2022-08-05 10:04 UTC (permalink / raw) To: Petr Vorel; +Cc: LTP List [-- Attachment #1.1: Type: text/plain, Size: 623 bytes --] Hi Petr, On Fri, Aug 5, 2022 at 3:14 PM Petr Vorel <pvorel@suse.cz> wrote: > Hi Li, > > obviously correct, thanks! > Patchset merged. > BTW if you wish to use rawhide in CI, we can give it a try > (could be reverted to fedora:latest - i.e. the latest release if got > problematic). > Thanks, but I'm not very passionate about enabling it, as we now have ltp quick test on fedora-rawhide internally(RedHat), but obviously that consumed people's energy on debugging *temporally* failure[1]. I'm still thinking if that's worth it. [1] some of them disappear after code-rebase or package upgrading -- Regards, Li Wang [-- Attachment #1.2: Type: text/html, Size: 1714 bytes --] [-- Attachment #2: Type: text/plain, Size: 60 bytes --] -- Mailing list info: https://lists.linux.it/listinfo/ltp ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [LTP] [PATCH 1/2] lapi/pidfd: adding pidfd header file 2022-08-05 10:04 ` Li Wang @ 2022-08-05 10:36 ` Petr Vorel 0 siblings, 0 replies; 8+ messages in thread From: Petr Vorel @ 2022-08-05 10:36 UTC (permalink / raw) To: Li Wang; +Cc: LTP List ... > Thanks, but I'm not very passionate about enabling it, as we now have > ltp quick test on fedora-rawhide internally(RedHat), but obviously that > consumed people's energy on debugging *temporally* failure[1]. I'm still > thinking if that's worth it. Hi Li, Sure, np. Petr > [1] some of them disappear after code-rebase or package upgrading -- Mailing list info: https://lists.linux.it/listinfo/ltp ^ permalink raw reply [flat|nested] 8+ messages in thread
* [LTP] [PATCH 2/2] lapi/fsmount: resolve conflict in different header files 2022-08-05 6:33 [LTP] [PATCH 0/2] fix compiling errors on fedora-rawhide Li Wang 2022-08-05 6:34 ` [LTP] [PATCH 1/2] lapi/pidfd: adding pidfd header file Li Wang @ 2022-08-05 6:34 ` Li Wang 2022-08-05 7:38 ` Petr Vorel 1 sibling, 1 reply; 8+ messages in thread From: Li Wang @ 2022-08-05 6:34 UTC (permalink / raw) To: ltp The latest glibc added new wrappers (e.g. mount_setattr, fsopen) support in sys/mount.h, which partly conflicts with linux/mount.h at the same time. We need to make adjustments to header files to fix compiling error on different platforms. Signed-off-by: Li Wang <liwang@redhat.com> --- configure.ac | 1 + include/lapi/fs.h | 6 ++++-- include/lapi/fsmount.h | 6 ++++-- testcases/kernel/syscalls/fsconfig/fsconfig01.c | 1 + testcases/kernel/syscalls/fsconfig/fsconfig02.c | 1 + testcases/kernel/syscalls/fsmount/fsmount01.c | 1 + testcases/kernel/syscalls/fsmount/fsmount02.c | 1 + testcases/kernel/syscalls/fsopen/fsopen01.c | 1 + testcases/kernel/syscalls/fsopen/fsopen02.c | 1 + testcases/kernel/syscalls/fspick/fspick01.c | 1 + testcases/kernel/syscalls/fspick/fspick02.c | 1 + testcases/kernel/syscalls/mount_setattr/mount_setattr01.c | 1 + testcases/kernel/syscalls/move_mount/move_mount01.c | 1 + testcases/kernel/syscalls/move_mount/move_mount02.c | 1 + testcases/kernel/syscalls/open_tree/open_tree01.c | 1 + testcases/kernel/syscalls/open_tree/open_tree02.c | 1 + 16 files changed, 22 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index d50ec1ea7..dbd53cab6 100644 --- a/configure.ac +++ b/configure.ac @@ -113,6 +113,7 @@ AC_CHECK_FUNCS_ONCE([ \ mkdirat \ mknodat \ modify_ldt \ + mount_setattr \ move_mount \ name_to_handle_at \ open_tree \ diff --git a/include/lapi/fs.h b/include/lapi/fs.h index 27b3a183c..84a168a67 100644 --- a/include/lapi/fs.h +++ b/include/lapi/fs.h @@ -6,8 +6,10 @@ * Email: code@zilogic.com */ -#ifdef HAVE_LINUX_FS_H -# include <linux/fs.h> +#ifndef HAVE_MOUNT_SETATTR +# ifdef HAVE_LINUX_FS_H +# include <linux/fs.h> +# endif #endif #include <sys/user.h> diff --git a/include/lapi/fsmount.h b/include/lapi/fsmount.h index b11e7a7bd..9b1993580 100644 --- a/include/lapi/fsmount.h +++ b/include/lapi/fsmount.h @@ -12,8 +12,10 @@ #include <sys/syscall.h> #include <sys/types.h> -#ifdef HAVE_LINUX_MOUNT_H -# include <linux/mount.h> +#ifndef HAVE_FSOPEN +# ifdef HAVE_LINUX_MOUNT_H +# include <linux/mount.h> +# endif #endif #include "lapi/fcntl.h" diff --git a/testcases/kernel/syscalls/fsconfig/fsconfig01.c b/testcases/kernel/syscalls/fsconfig/fsconfig01.c index a585daa6d..f1dc7d8da 100644 --- a/testcases/kernel/syscalls/fsconfig/fsconfig01.c +++ b/testcases/kernel/syscalls/fsconfig/fsconfig01.c @@ -5,6 +5,7 @@ * Basic fsconfig() test which tries to configure and mount the filesystem as * well. */ +#include <sys/mount.h> #include "tst_test.h" #include "lapi/fsmount.h" diff --git a/testcases/kernel/syscalls/fsconfig/fsconfig02.c b/testcases/kernel/syscalls/fsconfig/fsconfig02.c index 272e25a6f..bbad6def6 100644 --- a/testcases/kernel/syscalls/fsconfig/fsconfig02.c +++ b/testcases/kernel/syscalls/fsconfig/fsconfig02.c @@ -4,6 +4,7 @@ * * Basic fsconfig() failure tests. */ +#include <sys/mount.h> #include "tst_test.h" #include "lapi/fsmount.h" diff --git a/testcases/kernel/syscalls/fsmount/fsmount01.c b/testcases/kernel/syscalls/fsmount/fsmount01.c index 5f755863f..1232b0914 100644 --- a/testcases/kernel/syscalls/fsmount/fsmount01.c +++ b/testcases/kernel/syscalls/fsmount/fsmount01.c @@ -6,6 +6,7 @@ * Basic fsmount() test. */ +#include <sys/mount.h> #include "tst_test.h" #include "lapi/fsmount.h" diff --git a/testcases/kernel/syscalls/fsmount/fsmount02.c b/testcases/kernel/syscalls/fsmount/fsmount02.c index a4f42dc18..91512b74a 100644 --- a/testcases/kernel/syscalls/fsmount/fsmount02.c +++ b/testcases/kernel/syscalls/fsmount/fsmount02.c @@ -4,6 +4,7 @@ * * Basic fsmount() failure tests. */ +#include <sys/mount.h> #include "tst_test.h" #include "lapi/fsmount.h" diff --git a/testcases/kernel/syscalls/fsopen/fsopen01.c b/testcases/kernel/syscalls/fsopen/fsopen01.c index c2c719c96..332821cf0 100644 --- a/testcases/kernel/syscalls/fsopen/fsopen01.c +++ b/testcases/kernel/syscalls/fsopen/fsopen01.c @@ -5,6 +5,7 @@ * Basic fsopen() test which tries to configure and mount the filesystem as * well. */ +#include <sys/mount.h> #include "tst_test.h" #include "lapi/fsmount.h" diff --git a/testcases/kernel/syscalls/fsopen/fsopen02.c b/testcases/kernel/syscalls/fsopen/fsopen02.c index 3f287bf29..8c643b9a8 100644 --- a/testcases/kernel/syscalls/fsopen/fsopen02.c +++ b/testcases/kernel/syscalls/fsopen/fsopen02.c @@ -4,6 +4,7 @@ * * Basic fsopen() failure tests. */ +#include <sys/mount.h> #include "tst_test.h" #include "lapi/fsmount.h" diff --git a/testcases/kernel/syscalls/fspick/fspick01.c b/testcases/kernel/syscalls/fspick/fspick01.c index d3309a912..ae6cad6fb 100644 --- a/testcases/kernel/syscalls/fspick/fspick01.c +++ b/testcases/kernel/syscalls/fspick/fspick01.c @@ -4,6 +4,7 @@ * * Basic fspick() test. */ +#include <sys/mount.h> #include "tst_test.h" #include "lapi/fsmount.h" diff --git a/testcases/kernel/syscalls/fspick/fspick02.c b/testcases/kernel/syscalls/fspick/fspick02.c index f9a3697c1..907b463b6 100644 --- a/testcases/kernel/syscalls/fspick/fspick02.c +++ b/testcases/kernel/syscalls/fspick/fspick02.c @@ -4,6 +4,7 @@ * * Basic fspick() failure tests. */ +#include <sys/mount.h> #include "tst_test.h" #include "lapi/fsmount.h" diff --git a/testcases/kernel/syscalls/mount_setattr/mount_setattr01.c b/testcases/kernel/syscalls/mount_setattr/mount_setattr01.c index 83746b878..fcf491c33 100644 --- a/testcases/kernel/syscalls/mount_setattr/mount_setattr01.c +++ b/testcases/kernel/syscalls/mount_setattr/mount_setattr01.c @@ -30,6 +30,7 @@ #define _GNU_SOURCE #include <sys/statvfs.h> +#include <sys/mount.h> #include "tst_test.h" #include "lapi/fsmount.h" #include "lapi/stat.h" diff --git a/testcases/kernel/syscalls/move_mount/move_mount01.c b/testcases/kernel/syscalls/move_mount/move_mount01.c index 445e6197e..b65141a28 100644 --- a/testcases/kernel/syscalls/move_mount/move_mount01.c +++ b/testcases/kernel/syscalls/move_mount/move_mount01.c @@ -4,6 +4,7 @@ * * Basic move_mount() test. */ +#include <sys/mount.h> #include "tst_test.h" #include "lapi/fsmount.h" diff --git a/testcases/kernel/syscalls/move_mount/move_mount02.c b/testcases/kernel/syscalls/move_mount/move_mount02.c index 45b1db4be..373c8c3ac 100644 --- a/testcases/kernel/syscalls/move_mount/move_mount02.c +++ b/testcases/kernel/syscalls/move_mount/move_mount02.c @@ -4,6 +4,7 @@ * * Basic move_mount() failure tests. */ +#include <sys/mount.h> #include "tst_test.h" #include "lapi/fsmount.h" diff --git a/testcases/kernel/syscalls/open_tree/open_tree01.c b/testcases/kernel/syscalls/open_tree/open_tree01.c index 808d25665..6d2299449 100644 --- a/testcases/kernel/syscalls/open_tree/open_tree01.c +++ b/testcases/kernel/syscalls/open_tree/open_tree01.c @@ -4,6 +4,7 @@ * * Basic open_tree() test. */ +#include <sys/mount.h> #include "tst_test.h" #include "lapi/fsmount.h" diff --git a/testcases/kernel/syscalls/open_tree/open_tree02.c b/testcases/kernel/syscalls/open_tree/open_tree02.c index ddaa204f2..59a5a4ca2 100644 --- a/testcases/kernel/syscalls/open_tree/open_tree02.c +++ b/testcases/kernel/syscalls/open_tree/open_tree02.c @@ -4,6 +4,7 @@ * * Basic open_tree() failure tests. */ +#include <sys/mount.h> #include "tst_test.h" #include "lapi/fsmount.h" -- 2.35.3 -- Mailing list info: https://lists.linux.it/listinfo/ltp ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [LTP] [PATCH 2/2] lapi/fsmount: resolve conflict in different header files 2022-08-05 6:34 ` [LTP] [PATCH 2/2] lapi/fsmount: resolve conflict in different header files Li Wang @ 2022-08-05 7:38 ` Petr Vorel 2022-08-05 9:44 ` Li Wang 0 siblings, 1 reply; 8+ messages in thread From: Petr Vorel @ 2022-08-05 7:38 UTC (permalink / raw) To: Li Wang; +Cc: ltp Hi Li, > The latest glibc added new wrappers (e.g. mount_setattr, fsopen) support in > sys/mount.h, which partly conflicts with linux/mount.h at the same time. > We need to make adjustments to header files to fix compiling error on > different platforms. thanks for fixing this! Reviewed-by: Petr Vorel <pvorel@suse.cz> LGTM, with suggestion. > +#include <sys/mount.h> > #include "tst_test.h" > #include "lapi/fsmount.h" How about instead adding it to the tests to add it to lapi/fsmount.h ? #include <sys/mount.h> #ifndef HAVE_FSOPEN # ifdef HAVE_LINUX_MOUNT_H # include <linux/mount.h> # endif Works on rawhide https://github.com/pevik/ltp/actions/runs/2802006779 and on the rest https://github.com/pevik/ltp/actions/runs/2801968366 and my branch li/fix-compiling-errors.fixes Kind regards, Petr -- Mailing list info: https://lists.linux.it/listinfo/ltp ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [LTP] [PATCH 2/2] lapi/fsmount: resolve conflict in different header files 2022-08-05 7:38 ` Petr Vorel @ 2022-08-05 9:44 ` Li Wang 0 siblings, 0 replies; 8+ messages in thread From: Li Wang @ 2022-08-05 9:44 UTC (permalink / raw) To: Petr Vorel; +Cc: LTP List [-- Attachment #1.1: Type: text/plain, Size: 925 bytes --] Hi Petr, On Fri, Aug 5, 2022 at 3:38 PM Petr Vorel <pvorel@suse.cz> wrote: > Hi Li, > > > The latest glibc added new wrappers (e.g. mount_setattr, fsopen) support > in > > sys/mount.h, which partly conflicts with linux/mount.h at the same time. > > > We need to make adjustments to header files to fix compiling error on > > different platforms. > thanks for fixing this! > > Reviewed-by: Petr Vorel <pvorel@suse.cz> > LGTM, with suggestion. > > > +#include <sys/mount.h> > > #include "tst_test.h" > > #include "lapi/fsmount.h" > How about instead adding it to the tests to add it to lapi/fsmount.h ? It's weird, I was unable to compile successfully like this way yesterday. So finally go by one by one including the header. But after doing `make distclean` it works now, I guess there is probably something messes up my source directory. Anyway, thanks for your quick review, will merge soon. -- Regards, Li Wang [-- Attachment #1.2: Type: text/html, Size: 1947 bytes --] [-- Attachment #2: Type: text/plain, Size: 60 bytes --] -- Mailing list info: https://lists.linux.it/listinfo/ltp ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-08-05 10:36 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-08-05 6:33 [LTP] [PATCH 0/2] fix compiling errors on fedora-rawhide Li Wang 2022-08-05 6:34 ` [LTP] [PATCH 1/2] lapi/pidfd: adding pidfd header file Li Wang 2022-08-05 7:14 ` Petr Vorel 2022-08-05 10:04 ` Li Wang 2022-08-05 10:36 ` Petr Vorel 2022-08-05 6:34 ` [LTP] [PATCH 2/2] lapi/fsmount: resolve conflict in different header files Li Wang 2022-08-05 7:38 ` Petr Vorel 2022-08-05 9:44 ` Li Wang
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.