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.l...@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

Reply via email to