ltp.lists.linux.it archive mirror
 help / color / mirror / Atom feed
From: "xuyang2018.jy@fujitsu.com" <xuyang2018.jy@fujitsu.com>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: "ltp@lists.linux.it" <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH v3 3/7] lib/tst_safe_pidfd: Add SAFE_PIDFD_OPEN macro
Date: Thu, 24 Feb 2022 07:23:21 +0000	[thread overview]
Message-ID: <62173291.3040704@fujitsu.com> (raw)
In-Reply-To: <YhY2fZlfhv++XkMh@yuki>

Hi Cyril
> Hi!
>> +// SPDX-License-Identifier: GPL-2.0-or-later
>> +/*
>> + * Copyright (c) 2022 FUJITSU LIMITED. All rights reserved.
>> + * Author: Yang Xu<xuyang2018.jy@fujitsu.com>
>> + */
>> +
>> +#ifndef TST_SAFE_PIDFD_H__
>> +#define TST_SAFE_PIDFD_H__
>> +
>> +#include<unistd.h>
>> +#include "lapi/pidfd.h"
>> +
>> +int safe_pidfd_open(const char *file, const int lineno, pid_t pid,
>> +		    unsigned int flags);
>> +
>> +#define SAFE_PIDFD_OPEN(pid, flags) \
>> +	safe_pidfd_open(__FILE__, __LINE__, (pid), (flags))
>
> Is there a reason why we start a new header instead of adding this into
> the tst_safe_macros.h?
Just avoid a big tst_safe_macros.h like tst_safe_sysv_ipc.h does.
Also the pidfd related syscalls seems no libc wrapper.

Based on the above two points, I started a new header. Also if you want 
to merge it into tst_safe_macros.h, I will do(I don't have objection to 
add this into tst_safe_macros.h ).

Best Regards
Yang Xu
>
>

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

  reply	other threads:[~2022-02-24  7:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22  8:41 [LTP] [PATCH v3 1/7] Merge multiple pidfd*.h into one header Yang Xu
2022-02-22  8:41 ` [LTP] [PATCH v3 2/7] syscalls/pidfd_send_signal: Add docparse formatting Yang Xu
2022-02-23 13:25   ` Cyril Hrubis
2022-02-22  8:41 ` [LTP] [PATCH v3 3/7] lib/tst_safe_pidfd: Add SAFE_PIDFD_OPEN macro Yang Xu
2022-02-23 13:28   ` Cyril Hrubis
2022-02-24  7:23     ` xuyang2018.jy [this message]
2022-02-25 15:59       ` Cyril Hrubis
2022-03-01  5:59         ` xuyang2018.jy
2022-02-22  8:41 ` [LTP] [PATCH v3 4/7] syscalls/fanotify21: Make use of SAFE_PIDFD_OPEN Yang Xu
2022-02-23 13:29   ` Cyril Hrubis
2022-02-22  8:41 ` [LTP] [PATCH v3 5/7] syscalls/pidfd_open01, 04: Make use of SAFE_FCNTL Yang Xu
2022-02-23 13:34   ` Cyril Hrubis
2022-02-23 13:22 ` [LTP] [PATCH v3 1/7] Merge multiple pidfd*.h into one header 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=62173291.3040704@fujitsu.com \
    --to=xuyang2018.jy@fujitsu.com \
    --cc=chrubis@suse.cz \
    --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;
as well as URLs for NNTP newsgroup(s).