From: Wanlong Gao <gaowanlong@cn.fujitsu.com>
To: Jan Stancek <jstancek@redhat.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] get_robust_list01: use pid_max instead of UINT16_MAX
Date: Mon, 23 Dec 2013 09:22:11 +0800 [thread overview]
Message-ID: <52B79043.9070602@cn.fujitsu.com> (raw)
In-Reply-To: <69b0ae6d4039f97ac8bc68975640f8a79ac69aa2.1386926927.git.jstancek@redhat.com>
On 12/13/2013 05:29 PM, Jan Stancek wrote:
> UINT16_MAX can be a valid pid number on some systems.
>
> Signed-off-by: Jan Stancek <jstancek@redhat.com>
Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
> ---
> .../syscalls/get_robust_list/get_robust_list01.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/testcases/kernel/syscalls/get_robust_list/get_robust_list01.c b/testcases/kernel/syscalls/get_robust_list/get_robust_list01.c
> index dd5e726..17da538 100644
> --- a/testcases/kernel/syscalls/get_robust_list/get_robust_list01.c
> +++ b/testcases/kernel/syscalls/get_robust_list/get_robust_list01.c
> @@ -68,6 +68,7 @@ struct robust_list_head {
> };
>
> int exp_enos[] = { ESRCH, EPERM, EFAULT, 0 };
> +static unsigned int pid_max;
>
> void setup(void);
> void cleanup(void);
> @@ -134,7 +135,7 @@ int main(int argc, char **argv)
> * find the task specified by the pid argument.
> */
>
> - TEST(ltp_syscall(__NR_get_robust_list, UINT16_MAX,
> + TEST(ltp_syscall(__NR_get_robust_list, pid_max,
> (struct robust_list_head *)&head,
> &len_ptr));
>
> @@ -190,6 +191,7 @@ void setup(void)
> tst_require_root(NULL);
>
> TEST_EXP_ENOS(exp_enos);
> + SAFE_FILE_SCANF(NULL, "/proc/sys/kernel/pid_max", "%u", &pid_max);
>
> TEST_PAUSE;
> }
>
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2013-12-23 1:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-13 9:29 [LTP] [PATCH] get_robust_list01: use pid_max instead of UINT16_MAX Jan Stancek
2013-12-23 1:22 ` Wanlong Gao [this message]
2013-12-25 0:58 ` Wanlong Gao
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=52B79043.9070602@cn.fujitsu.com \
--to=gaowanlong@cn.fujitsu.com \
--cc=jstancek@redhat.com \
--cc=ltp-list@lists.sourceforge.net \
/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