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 <[email protected]>

Reviewed-by: Wanlong Gao <[email protected]>

> ---
>  .../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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to