public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Chen Hanxiao <chenhx.fnst@fujitsu.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v3] syscalls/mount_setattr01: Add basic functional test
Date: Mon, 25 Apr 2022 12:48:03 +0200	[thread overview]
Message-ID: <YmZ8Y7cZNBd55/oR@pevik> (raw)
In-Reply-To: <20220425060806.1038-1-chenhx.fnst@fujitsu.com>

Hi Chen, all,

> diff --git a/include/lapi/fsmount.h b/include/lapi/fsmount.h
> +
> +/*
> + * mount_setattr()
> + */
> +struct mount_attr {
If you build on new enough glibc (and apply to recent master), you get failures
due struct redefinition:

In file included from mount_setattr01.c:34:
../../../../include/lapi/fsmount.h:48:8: error: redefinition of ‘struct mount_attr’
   48 | struct mount_attr {
      |        ^~~~~~~~~~
In file included from ../../../../include/lapi/mount.h:11,
                 from ../../../../include/lapi/fsmount.h:15,
                 from mount_setattr01.c:34:
/usr/include/linux/mount.h:129:8: note: originally defined here

This is due my recent changes:

c0cb5d196 ("lapi/mount.h: Include kernel/libc header")
https://github.com/linux-test-project/ltp/commit/c0cb5d1962f72065df22cddb774d5246c9057639

8ae596f8b ("lapi/fsmount.h: Include lapi/mount.h instead libc header")
https://github.com/linux-test-project/ltp/commit/8ae596f8b54d0e881d5d8d84c1528b47ced72e66

This requires to put into configure.ac
AC_CHECK_TYPES([struct mount_attr],,,[
#ifdef HAVE_LINUX_MOUNT_H
# include <linux/mount.h>
#else
# include <sys/mount.h>
#endif
])

and here check for #ifndef HAVE_STRUCT_MOUNT_ATTR

Maybe it wasn't a good idea to combine <linux/mount.h> and <sys/mount.h>
(struct is only in <linux/mount.h>).

If we agree on it and this is the only issue, it can be applied before merge.

Kind regards,
Petr

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

  reply	other threads:[~2022-04-25 10:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-25  6:08 [LTP] [PATCH v3] syscalls/mount_setattr01: Add basic functional test Chen Hanxiao
2022-04-25 10:48 ` Petr Vorel [this message]
2022-04-26 10:18   ` [LTP] 回复: " chenhx.fnst
2022-04-26 12:43 ` [LTP] " Cyril Hrubis
2022-04-27  8:23   ` [LTP] 回复: " chenhx.fnst
2022-04-27 15:30     ` [LTP] ????: " Cyril Hrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YmZ8Y7cZNBd55/oR@pevik \
    --to=pvorel@suse.cz \
    --cc=chenhx.fnst@fujitsu.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox