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 <kraka...@google.com>
---
 tools/testing/selftests/net/gro.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tools/testing/selftests/net/gro.c 
b/tools/testing/selftests/net/gro.c
index b2184847e388..d5824eadea10 100644
--- a/tools/testing/selftests/net/gro.c
+++ b/tools/testing/selftests/net/gro.c
@@ -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;
 }
-- 
2.48.1.658.g4767266eb4-goog


Reply via email to