Skip to content

Commit

Permalink
selftests/net: only print passing message in GRO tests when tests pass
Browse files Browse the repository at this point in the history
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 <krakauer@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20250226192725.621969-3-krakauer@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Kevin Krakauer authored and Jakub Kicinski committed Feb 28, 2025
1 parent 784e6ab commit 41cda57
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tools/testing/selftests/net/gro.c
Original file line number Diff line number Diff line change
Expand Up @@ -1318,11 +1318,13 @@ int main(int argc, char **argv)
read_MAC(src_mac, smac);
read_MAC(dst_mac, dmac);

if (tx_socket)
if (tx_socket) {
gro_sender();
else
} else {
/* Only the receiver exit status determines test success. */
gro_receiver();
fprintf(stderr, "Gro::%s test passed.\n", testname);
}

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

0 comments on commit 41cda57

Please sign in to comment.