From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/3 v2] lib: tst_process_state: Use SPDX and format alignment
Date: Fri, 18 Jun 2021 13:46:23 +0200 [thread overview]
Message-ID: <YMyHj8em7HRG8XrS@yuki> (raw)
In-Reply-To: <20210617105556.130869-2-xieziyao@huawei.com>
Hi!
> ---
> v1->v2:
> 1. Move changes in license and whitespaces to a separate patch.
>
> include/tst_process_state.h | 23 +++++++++--------------
> lib/tst_process_state.c | 31 +++++++------------------------
> 2 files changed, 16 insertions(+), 38 deletions(-)
>
> diff --git a/include/tst_process_state.h b/include/tst_process_state.h
> index c32aa58e6..32eaf46d9 100644
> --- a/include/tst_process_state.h
> +++ b/include/tst_process_state.h
> @@ -2,13 +2,10 @@
> * Copyright (C) 2012-2014 Cyril Hrubis chrubis@suse.cz
> */
>
> - /*
> -
> - These functions helps you wait till a process with given pid changes state.
> - This is for example useful when you need to wait in parent until child
> - blocks.
> -
> - */
> +/*
> + * These functions helps you wait till a process with given pid changes state.
> + * This is for example useful when you need to wait in parent until child blocks.
> + */
>
> #ifndef TST_PROCESS_STATE__
> #define TST_PROCESS_STATE__
> @@ -29,8 +26,7 @@
> #ifdef TST_TEST_H__
>
> #define TST_PROCESS_STATE_WAIT(pid, state, msec_timeout) \
> - tst_process_state_wait(__FILE__, __LINE__, NULL, \
> - (pid), (state), (msec_timeout))
> + tst_process_state_wait(__FILE__, __LINE__, NULL, (pid), (state), (msec_timeout))
This actually creates a line over 80 chars, so I guess that the proper
fix would be keeping the pid, state and timeout on a separate line but
using tabs instead of spaces for indentation.
> #else
> /*
> * The same as above but does not use tst_brkm() interface.
> @@ -41,13 +37,12 @@
> */
> int tst_process_state_wait2(pid_t pid, const char state);
>
> -# define TST_PROCESS_STATE_WAIT(cleanup_fn, pid, state) \
> - tst_process_state_wait(__FILE__, __LINE__, (cleanup_fn), \
> - (pid), (state), 0)
> +#define TST_PROCESS_STATE_WAIT(cleanup_fn, pid, state) \
> + tst_process_state_wait(__FILE__, __LINE__, (cleanup_fn), (pid), (state), 0)
And here as well.
Apart from these two minor issues the rest looks fine.
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2021-06-18 11:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-17 10:55 [LTP] [PATCH 0/3 v2] Cleanup and bugfix for getrusage03 Xie Ziyao
2021-06-17 10:55 ` [LTP] [PATCH 1/3 v2] lib: tst_process_state: Use SPDX and format alignment Xie Ziyao
2021-06-18 11:46 ` Cyril Hrubis [this message]
2021-06-17 10:55 ` [LTP] [PATCH 2/3 v2] lib: tst_process_state: Add tst_process_exit_wait() Xie Ziyao
2021-06-18 11:53 ` Cyril Hrubis
2021-06-17 10:55 ` [LTP] [PATCH 3/3 v2] getrusage: Cleanup and bugfix for getrusage03 Xie Ziyao
2021-06-18 12:20 ` Cyril Hrubis
2021-06-18 13:16 ` xieziyao
2021-06-18 18:04 ` 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=YMyHj8em7HRG8XrS@yuki \
--to=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