Hi!
> Add EINVAL error number test.
> 
> Signed-off-by: Zuo Faqi <[email protected]>
> ---
>  testcases/kernel/syscalls/getpeername/getpeername01.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/testcases/kernel/syscalls/getpeername/getpeername01.c 
> b/testcases/kernel/syscalls/getpeername/getpeername01.c
> index 7aa72cb..7ed90f2 100644
> --- a/testcases/kernel/syscalls/getpeername/getpeername01.c
> +++ b/testcases/kernel/syscalls/getpeername/getpeername01.c
> @@ -39,6 +39,7 @@
>  static struct sockaddr_in server_addr;
>  static struct sockaddr_in fsin1;
>  static socklen_t sinlen;
> +static socklen_t invalid_sinlen;
>  static int sv[2];
>  
>  static void setup(void);
> @@ -72,12 +73,14 @@ struct test_case_t {
>        cleanup4, "EFAULT"},
>       {-1, (struct sockaddr *)&fsin1, (socklen_t *)1, -1, EFAULT, setup4,
>        cleanup4, "EFAULT"},
> +     {-1, (struct sockaddr *)&fsin1, &invalid_sinlen, -1, EINVAL, setup4,
> +      cleanup4, "EINVAL"},
>  #endif
>  };

I've moved the new test before the UCLINUX ifdef because the test should
work on uClinux.

Pushed both patches, thanks.

-- 
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to