* [LTP] [PATCH V2] recvfrom01: Fix invalid flags in testcase 4
@ 2014-09-25 11:58 Chuck Ebbert
2014-09-25 12:21 ` Jan Stancek
0 siblings, 1 reply; 2+ messages in thread
From: Chuck Ebbert @ 2014-09-25 11:58 UTC (permalink / raw)
To: ltp-list
The recv testcases 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 recfrom01 testcase 4 has invalid message
flags in addition to its invalid address length, making it equivalent
to test 6 (because the flags get checked first).
Remove the invalid flags, and change the text so it's more clear what
is being tested.
Also fix indentation that made it harder to spot this bug.
Version 2: Add better text and remove an erroneous change to the
buffer length spotted by Jan Stancek.
[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.lkml@gmail.com>
--- a/testcases/kernel/syscalls/recvfrom/recvfrom01.c
+++ b/testcases/kernel/syscalls/recvfrom/recvfrom01.c
@@ -105,9 +105,9 @@
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, sizeof(buf), 0,
(struct sockaddr *)&from, &fromlen,
- -1, EINVAL, setup2, cleanup1, "invalid socket length"},
+ -1, EINVAL, setup2, cleanup1, "invalid socket addr length"},
/* 5 */
{
PF_INET, SOCK_STREAM, 0, (void *)-1, sizeof(buf), 0,
@@ -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
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [LTP] [PATCH V2] recvfrom01: Fix invalid flags in testcase 4
2014-09-25 11:58 [LTP] [PATCH V2] recvfrom01: Fix invalid flags in testcase 4 Chuck Ebbert
@ 2014-09-25 12:21 ` Jan Stancek
0 siblings, 0 replies; 2+ messages in thread
From: Jan Stancek @ 2014-09-25 12:21 UTC (permalink / raw)
To: Chuck Ebbert; +Cc: ltp-list
----- Original Message -----
> From: "Chuck Ebbert" <cebbert.lkml@gmail.com>
> To: ltp-list@lists.sourceforge.net
> Cc: "Jan Stancek" <jstancek@redhat.com>
> Sent: Thursday, 25 September, 2014 1:58:38 PM
> Subject: [PATCH V2] recvfrom01: Fix invalid flags in testcase 4
>
> The recv testcases 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 recfrom01 testcase 4 has invalid message
> flags in addition to its invalid address length, making it equivalent
> to test 6 (because the flags get checked first).
>
> Remove the invalid flags, and change the text so it's more clear what
> is being tested.
>
> Also fix indentation that made it harder to spot this bug.
>
> Version 2: Add better text and remove an erroneous change to the
> buffer length spotted by Jan Stancek.
>
> [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.lkml@gmail.com>
I tested and pushed this.
Regards,
Jan
------------------------------------------------------------------------------
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-09-25 12:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-25 11:58 [LTP] [PATCH V2] recvfrom01: Fix invalid flags in testcase 4 Chuck Ebbert
2014-09-25 12:21 ` Jan Stancek
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.