public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: zhanglianjie <zhanglianjie@uniontech.com>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v4 1/5] syscalls/clone02: Convert to new API
Date: Sat, 16 Oct 2021 21:07:23 +0800	[thread overview]
Message-ID: <dd19b9d7-ef55-ebe5-90d9-415bd35dc4f9@uniontech.com> (raw)
In-Reply-To: <YWlQlXfHu6FXQAx/@pevik>

Hi,
This is great, thanks.

在 2021/10/15 17:57, Petr Vorel 写道:
> Hi,
> 
>> +++ b/testcases/kernel/syscalls/clone/clone02.c
> ...
>> +static char *res_name[] = {
>> +	[1] = "CLONE_VM",
>> +	[2] = "CLONE_FS",
>> +	[4] = "CLONE_FILES",
>> +	[8] = "CLONE_SIGHAND",
>>   };
> 
> Not really that important, but you could
> 1) Instead of hardwired indexes use constants from <sched.h>.
> 2) To get their string values with macro stringification.
> 
> #define CLONE_DESC(x) [x] = #x
> 
> static char *res_name[] = {
> 	CLONE_DESC(CLONE_VM),
> 	CLONE_DESC(CLONE_FS),
> 	CLONE_DESC(CLONE_FILES),
> 	CLONE_DESC(CLONE_SIGHAND),
> };
> 
> If this is the only change, it can be replaced during merge.
> 
> Kind regards,
> Petr
> 

-- 
Regards,
Zhang Lianjie



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

  reply	other threads:[~2021-10-16 13:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-14  1:25 [LTP] [PATCH v4 1/5] syscalls/clone02: Convert to new API zhanglianjie
2021-10-14  1:25 ` [LTP] [PATCH v4 2/5] syscalls/clone03: " zhanglianjie
2021-10-27 12:32   ` Cyril Hrubis
2021-10-14  1:25 ` [LTP] [PATCH v4 3/5] syscalls/clone05: " zhanglianjie
2021-10-27 12:52   ` Cyril Hrubis
2021-10-14  1:25 ` [LTP] [PATCH v4 4/5] syscalls/clone06: " zhanglianjie
2021-10-27 13:26   ` Cyril Hrubis
2021-10-14  1:25 ` [LTP] [PATCH v4 5/5] syscalls/clone07: " zhanglianjie
2021-10-27 13:40   ` Cyril Hrubis
2021-10-15  9:57 ` [LTP] [PATCH v4 1/5] syscalls/clone02: " Petr Vorel
2021-10-16 13:07   ` zhanglianjie [this message]
2021-10-27 12:00 ` 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=dd19b9d7-ef55-ebe5-90d9-415bd35dc4f9@uniontech.com \
    --to=zhanglianjie@uniontech.com \
    --cc=ltp@lists.linux.it \
    --cc=pvorel@suse.cz \
    /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