All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Jack Morgan <jmorgan@naotchy.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/2] statmount.h: add check for STATMOUNT_MNT_NS_ID
Date: Mon, 15 Sep 2025 11:06:05 +0200	[thread overview]
Message-ID: <aMfW_bP12FUgR15H@yuki.lan> (raw)
In-Reply-To: <20250913005759.2946000-1-jmorgan@naotchy.com>

Hi!
> Enable mnt_ns_id check for kenels that support it
> It's can be deinfed as envornment variable with
> LTP_HAVE_STATMOUNT_MNT_NS_ID.
> 
> Fixes: #1260
> 
> Signed-off-by: Jack Morgan <jmorgan@naotchy.com>
> ---
>  testcases/kernel/syscalls/statmount/statmount.h | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/testcases/kernel/syscalls/statmount/statmount.h b/testcases/kernel/syscalls/statmount/statmount.h
> index d21d7f8da..b1696515d 100644
> --- a/testcases/kernel/syscalls/statmount/statmount.h
> +++ b/testcases/kernel/syscalls/statmount/statmount.h
> @@ -13,6 +13,11 @@
>  #include "lapi/syscalls.h"
>  #include "tst_safe_stdio.h"
> 
> +/* Enable mnt_ns_id check when system struct statmount is not defined. */
> +#if !defined(HAVE_STRUCT_STATMOUNT) && !defined(LTP_HAVE_STATMOUNT_MNT_NS_ID)
> +#define LTP_HAVE_STATMOUNT_MNT_NS_ID 1
> +#endif

We actually have a fallback definition for the statmount structure in
include/lapi/mount.h so the structure is always defined. So there is no
need for this and we can just do:

#if !defined(LTP_HAVE_STATMOUNT_MNT_NS_ID) \


in the test.

>  static inline int statmount(uint64_t mnt_id, uint64_t mask, struct statmount *buf,
>  		     size_t bufsize, unsigned int flags)
>  {
> --
> 2.51.0
> 
> 
> 
> -- 
> Mailing list info: https://lists.linux.it/listinfo/ltp

-- 
Cyril Hrubis
chrubis@suse.cz

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

  parent reply	other threads:[~2025-09-15  9:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-13  0:58 [LTP] [PATCH 1/2] statmount.h: add check for STATMOUNT_MNT_NS_ID Jack Morgan
2025-09-13  0:58 ` [LTP] [PATCH] statmount09.c: Enable mnt_ns_id " Jack Morgan
2025-09-15  9:06 ` Cyril Hrubis [this message]
2025-09-15  9:15   ` [LTP] [PATCH 1/2] statmount.h: add check " Cyril Hrubis
2025-09-17 14:59     ` Jack Morgan

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=aMfW_bP12FUgR15H@yuki.lan \
    --to=chrubis@suse.cz \
    --cc=jmorgan@naotchy.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 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.