Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/net: Fix broken test case in psock_fanout

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>

authored by

Mike Maloney and committed by
David S. Miller
472ecf08 799dbe3e

+1 -1
+1 -1
tools/testing/selftests/net/psock_fanout.c
··· 305 305 exit(1); 306 306 } 307 307 308 - if (sock_fanout_open(PACKET_FANOUT_CPU, first_group_id)) { 308 + if (sock_fanout_open(PACKET_FANOUT_CPU, first_group_id) != -1) { 309 309 fprintf(stderr, "ERROR: joined group with wrong type.\n"); 310 310 exit(1); 311 311 }