From: Petr Vorel <pvorel@suse.cz>
To: zhanglianjie <zhanglianjie@uniontech.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v4 1/5] syscalls/clone02: Convert to new API
Date: Fri, 15 Oct 2021 11:57:41 +0200 [thread overview]
Message-ID: <YWlQlXfHu6FXQAx/@pevik> (raw)
In-Reply-To: <20211014012533.18205-1-zhanglianjie@uniontech.com>
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
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2021-10-15 9:57 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 ` Petr Vorel [this message]
2021-10-16 13:07 ` [LTP] [PATCH v4 1/5] syscalls/clone02: " zhanglianjie
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=YWlQlXfHu6FXQAx/@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
--cc=zhanglianjie@uniontech.com \
/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