selftests/net: Fix broken test case in psock_fanout
authorMike Maloney <maloney@google.com>
Tue, 25 Apr 2017 01:29:11 +0000 (21:29 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Apr 2017 15:56:17 +0000 (11:56 -0400)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/psock_fanout.c

index b4b1d91fcea57ecf288722e95c6c1dd2050a0e66..989f917068d1ccfa1dd67ed8d2353b4b13904d2b 100644 (file)
@@ -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);
        }