Skip to content

Commit 41cda57

Browse files
kevinGCkuba-moo
authored andcommitted
selftests/net: only print passing message in GRO tests when tests pass
gro.c:main no longer erroneously claims a test passes when running as a sender. Tested: Ran `gro.sh -t large` to verify the sender no longer prints a status. Signed-off-by: Kevin Krakauer <[email protected]> Reviewed-by: Willem de Bruijn <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 784e6ab commit 41cda57

File tree

1 file changed

+5
-3
lines changed
  • tools/testing/selftests/net

1 file changed

+5
-3
lines changed

tools/testing/selftests/net/gro.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,11 +1318,13 @@ int main(int argc, char **argv)
13181318
read_MAC(src_mac, smac);
13191319
read_MAC(dst_mac, dmac);
13201320

1321-
if (tx_socket)
1321+
if (tx_socket) {
13221322
gro_sender();
1323-
else
1323+
} else {
1324+
/* Only the receiver exit status determines test success. */
13241325
gro_receiver();
1326+
fprintf(stderr, "Gro::%s test passed.\n", testname);
1327+
}
13251328

1326-
fprintf(stderr, "Gro::%s test passed.\n", testname);
13271329
return 0;
13281330
}

0 commit comments

Comments
 (0)