----- Original Message -----
> From: "Chuck Ebbert" <cebbert.l...@gmail.com>
> To: ltp-list@lists.sourceforge.net
> Sent: Wednesday, 24 September, 2014 4:05:30 PM
> Subject: [LTP] [PATCH] Fix wrong args in recvfrom syscall testcase
> 
> The recvfrom01 testcase had reported failures on 3.17-rc [1].
> 
> Three of those failures were invalid assumptions about kernel behavior
> with every possible flag set. [2]
> 
> The fourth failure is because arguments are mixed up in testcase 4,
> making it identical to testcase 6.

With the exception of setup function.

> Fix that.
> Also fix indentation that made it harder to spot this bug.
> 
> [1] https://bugzilla.redhat.com/show_bug.cgi?id=1145325
> [2] http://marc.info/?t=141148149900006&r=1&w=2
> 
> Signed-off-by: Chuck Ebbert <cebbert.l...@gmail.com>
> 
> --- a/testcases/kernel/syscalls/recvfrom/recvfrom01.c
> +++ b/testcases/kernel/syscalls/recvfrom/recvfrom01.c
> @@ -105,7 +105,7 @@
>                   0, ENOTSOCK, setup1, cleanup1, "invalid socket buffer"},
>  /* 4 */
>       {
> -     PF_INET, SOCK_STREAM, 0, (void *)buf, sizeof(buf), -1,
> +     PF_INET, SOCK_STREAM, 0, (void *)buf, -1, 0,

I understand setting flags to 0, but why changing also buflen to -1?

Regards,
Jan

>                   (struct sockaddr *)&from, &fromlen,
>                   -1, EINVAL, setup2, cleanup1, "invalid socket length"},
>  /* 5 */
> @@ -115,7 +115,7 @@
>                   -1, EFAULT, setup1, cleanup1, "invalid recv buffer"},
>  /* 6 */
>       {
> -PF_INET, SOCK_STREAM, 0, (void *)buf, sizeof(buf), -1,
> +     PF_INET, SOCK_STREAM, 0, (void *)buf, sizeof(buf), -1,
>                   (struct sockaddr *)&from, &fromlen,
>                   -1, EINVAL, setup1, cleanup1, "invalid flags set"},};
>  
> 
> ------------------------------------------------------------------------------
> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list
> 

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to