All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Ebbert <cebbert.lkml@gmail.com>
To: ltp-list@lists.sourceforge.net
Subject: [LTP] [PATCH V2] recvfrom01: Fix invalid flags in testcase 4
Date: Thu, 25 Sep 2014 06:58:38 -0500	[thread overview]
Message-ID: <20140925065838.7faf7cef@as> (raw)

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

             reply	other threads:[~2014-09-25 11:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-25 11:58 Chuck Ebbert [this message]
2014-09-25 12:21 ` [LTP] [PATCH V2] recvfrom01: Fix invalid flags in testcase 4 Jan Stancek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140925065838.7faf7cef@as \
    --to=cebbert.lkml@gmail.com \
    --cc=ltp-list@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.