public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v6 3/5] Add fchmodat2 fallback definition
Date: Fri, 2 Aug 2024 13:30:32 +0200	[thread overview]
Message-ID: <20240802113032.GA1626431@pevik> (raw)
In-Reply-To: <20240802-fchmodat2-v6-3-dcb0293979b3@suse.com>

Hi Andrea,


> Reviewed-by: Petr Vorel <pvorel@suse.cz>
> Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
> ---
>  include/lapi/stat.h | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)

> diff --git a/include/lapi/stat.h b/include/lapi/stat.h
> index 3606c9eb0..8e38ecfef 100644
> --- a/include/lapi/stat.h
> +++ b/include/lapi/stat.h
> @@ -229,4 +229,20 @@ static inline int statx(int dirfd, const char *pathname, unsigned int flags,
>  # define STATX_ATTR_VERITY	0x00100000
>  #endif

> +#define SAFE_FCHMODAT2(dfd, filename, mode, flags) \
> +	safe_fchmodat2(__FILE__, __LINE__, (dfd), (filename), (mode), (flags))
> +
> +static inline int safe_fchmodat2(const char *file, const int lineno,
> +		int dfd, const char *filename, mode_t mode, int flags)
> +{
> +	int ret;
> +
> +	ret = tst_syscall(__NR_fchmodat2, dfd, filename, mode, flags);
> +	if (ret == -1)
> +		tst_brk_(file, lineno, TBROK | TERRNO, "%s(%d,%s,%d,%d) error",
> +			__func__, dfd, filename, mode, flags);
I'm sorry, I overlook that errno check is not needed. tst_syscall() does it
(see include/lapi/syscalls.h). Please remove it before merge.

With this:
Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr

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

  reply	other threads:[~2024-08-02 11:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-02 10:59 [LTP] [PATCH v6 0/5] Add fchmodat2 testing suite Andrea Cervesato
2024-08-02 10:59 ` [LTP] [PATCH v6 1/5] Add SAFE_SYMLINKAT macro Andrea Cervesato
2024-08-02 11:31   ` Petr Vorel
2024-08-02 12:20     ` Andrea Cervesato via ltp
2024-08-02 10:59 ` [LTP] [PATCH v6 2/5] Add fchmodat2 syscalls definitions Andrea Cervesato
2024-08-02 10:59 ` [LTP] [PATCH v6 3/5] Add fchmodat2 fallback definition Andrea Cervesato
2024-08-02 11:30   ` Petr Vorel [this message]
2024-08-02 11:34     ` Andrea Cervesato via ltp
2024-08-05 15:36       ` Petr Vorel
2024-08-02 10:59 ` [LTP] [PATCH v6 4/5] Add fchmodat2_01 test Andrea Cervesato
2024-08-02 11:35   ` Petr Vorel
2024-08-02 10:59 ` [LTP] [PATCH v6 5/5] Add fchmodat2_02 test Andrea Cervesato

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=20240802113032.GA1626431@pevik \
    --to=pvorel@suse.cz \
    --cc=andrea.cervesato@suse.de \
    --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