All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Maloney <maloneykernel@gmail.com>
To: netdev@vger.kernel.org, davem@davemloft.net
Cc: Mike Maloney <maloney@google.com>
Subject: [PATCH net-next] selftests/net: Fix broken test case in psock_fanout
Date: Mon, 24 Apr 2017 21:29:11 -0400	[thread overview]
Message-ID: <20170425012911.903-1-maloneykernel@gmail.com> (raw)

From: Mike Maloney <maloney@google.com>

The error return falue form sock_fanout_open is -1, not zero.  One test
case was checking for 0 instead of -1.

Tested: Built and tested in clean client.
Signed-off-by: Mike Maloney <maloney@google.com>
---
 tools/testing/selftests/net/psock_fanout.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/net/psock_fanout.c b/tools/testing/selftests/net/psock_fanout.c
index b4b1d91fcea5..989f917068d1 100644
--- a/tools/testing/selftests/net/psock_fanout.c
+++ b/tools/testing/selftests/net/psock_fanout.c
@@ -305,7 +305,7 @@ static void test_unique_fanout_group_ids(void)
 		exit(1);
 	}
 
-	if (sock_fanout_open(PACKET_FANOUT_CPU, first_group_id)) {
+	if (sock_fanout_open(PACKET_FANOUT_CPU, first_group_id) != -1) {
 		fprintf(stderr, "ERROR: joined group with wrong type.\n");
 		exit(1);
 	}
-- 
2.13.0.rc0.306.g87b477812d-goog

             reply	other threads:[~2017-04-25  1:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-25  1:29 Mike Maloney [this message]
2017-04-25 15:56 ` [PATCH net-next] selftests/net: Fix broken test case in psock_fanout David Miller

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=20170425012911.903-1-maloneykernel@gmail.com \
    --to=maloneykernel@gmail.com \
    --cc=davem@davemloft.net \
    --cc=maloney@google.com \
    --cc=netdev@vger.kernel.org \
    /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.