From patchwork Wed Feb 26 19:27:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Krakauer X-Patchwork-Id: 13993067 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-pj1-f74.google.com (mail-pj1-f74.google.com [209.85.216.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 380D2239588 for ; Wed, 26 Feb 2025 19:28:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740598109; cv=none; b=HMnLSXHOKA8uVI6THBuL1ulZ+1IrNOVLipAX1QAjHG+pKAjQO/5IC8X/zqzicMq07fl8UaX4avTxFu2HeSHrNnM0lC5/J3nHlhnTjHPRxwHZrvd1HlP2G/tkoVRp+2+4Q/5xABbIhBMw7K1fyXegN/JXJdE6m1lITpM1uD0jhYo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740598109; c=relaxed/simple; bh=tmN5JwTaZ421JUVQTXr4tJNOy/0VgsWNPYovSN2FDSU=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=LDqDtdyic7ZSYdo6ijO+6+pSaGy/oZDz1la5WQ4d7go4vkg8JrUhlhKJdZ68+IEMKR62Lx24dbYPzAixOYML56CS1WfcS9smSs3Jp0/1u99mYfkUkc93Eclmy/7uNft/pnHCF4xemXeLKPvNLP7l2r1vZW3YYuAFXEbUMY/O7/4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--krakauer.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=Pzm/OXZ+; arc=none smtp.client-ip=209.85.216.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--krakauer.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Pzm/OXZ+" Received: by mail-pj1-f74.google.com with SMTP id 98e67ed59e1d1-2fbff6426f5so373970a91.3 for ; Wed, 26 Feb 2025 11:28:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1740598106; x=1741202906; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=bfKyFrAiD8h/LnMC+tGogS6xsvZrTTIIDx60NZVpyZE=; b=Pzm/OXZ+TgUygYunrr38Ff4cgRZlJiJiNBJm79oEzx/i9MN5qv0SyOepDmYspAIIWV DFkLy2p9aKgT2LaFlnVpwOaUCbLWO5BpwFQj0mnHjQmalnKuk0+ECQiHFx6jlSV0nEvK 0WlOxUAKfJQFoYxY3KYtTreUK0Nb+D+xqO4HvAjPCrhq/nUMziPUUn1gks6AwU3d2RGY eIFtLF/GXT/yYeGzTTwjXnoLcoP+0hpYlJMPcaEjAz/DDTJYA0RVRVDHbk1tnDOTiDcg AT7o1vx1+0V35NKKGp4RQR7jyLF8+NBuz4e1bu0yor8wHTUuqxHHdJcbvb0P/68hDArA WEVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740598106; x=1741202906; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=bfKyFrAiD8h/LnMC+tGogS6xsvZrTTIIDx60NZVpyZE=; b=nWVD5ViFUzMf6vvclZyyaqgN0PomtxbI1KlcXIWNxhWIH7jzCbXQWYcLrlwp7UU/gn AGutyKiwV4FhkiEVF5Lb68lFBMFNxmBU7by4hsd/53Y/OR1iqrEgxNPYtYfcdKHmUX5R bN8NUsht2j13ZvZqYdHT063qNtpUOGOAlm6seT6YicZZXIfsMPfNXyEm692d5TQzJZwh dfyb1Vh0Fi0hs9DOGnuK+Rl4PAcDJMakaHot4K3MS3RVKFBQloIZZ6oJ3BrG7sG+audt IT+C2rW+BvzWAODLwDdg8Fr8ALOt9frcvHXtB1mFoyX55BV/RWClRxptM2P2/dAg1TnY SoIg== X-Gm-Message-State: AOJu0Yw45NWzgnGIaOPIuzsF9OX8mSecfwRzITvc3fV95whaaPyNU7PJ rsLEo0Awp2EZuTVWWNV+9V6mrrRpTs/iGTTl4lSjWF0BDjGBo2/e7suT+f8kkJywfa7pcZJA+Z3 zVCb4jk5873bIn5pqbKe5v8bhdVevklRhuRm3MQSz0XLp5psIq46DgJhY1465PDlNWW4YLJlRae Picd80/ovhHK/Eb3J2kqw5Q9fUKPF8G8PyvIwb903Mlw== X-Google-Smtp-Source: AGHT+IH6eAP4Cyst+V85LJmLhx2Rg1bDfnJ+WmNbTdbRluW4pkEzVr68R+e3txlLoA5Mp3lBArRubTvC02kHFg== X-Received: from pjbtc16.prod.google.com ([2002:a17:90b:5410:b0:2f7:d453:e587]) (user=krakauer job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:5243:b0:2f4:434d:c7f0 with SMTP id 98e67ed59e1d1-2fe68ada3e8mr15762000a91.12.1740598106543; Wed, 26 Feb 2025 11:28:26 -0800 (PST) Date: Wed, 26 Feb 2025 11:27:23 -0800 In-Reply-To: <20250226192725.621969-1-krakauer@google.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20250226192725.621969-1-krakauer@google.com> X-Mailer: git-send-email 2.48.1.658.g4767266eb4-goog Message-ID: <20250226192725.621969-2-krakauer@google.com> Subject: [PATCH v2 1/3] selftests/net: have `gro.sh -t` return a correct exit code From: Kevin Krakauer To: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Shuah Khan , linux-kernel@vger.kernel.org, Kevin Krakauer X-Patchwork-Delegate: kuba@kernel.org Modify gro.sh to return a useful exit code when the -t flag is used. It formerly returned 0 no matter what. Tested: Ran `gro.sh -t large` and verified that test failures return 1. Signed-off-by: Kevin Krakauer --- tools/testing/selftests/net/gro.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/gro.sh b/tools/testing/selftests/net/gro.sh index 02c21ff4ca81..aabd6e5480b8 100755 --- a/tools/testing/selftests/net/gro.sh +++ b/tools/testing/selftests/net/gro.sh @@ -100,5 +100,6 @@ trap cleanup EXIT if [[ "${test}" == "all" ]]; then run_all_tests else - run_test "${proto}" "${test}" + exit_code=$(run_test "${proto}" "${test}") + exit $exit_code fi; From patchwork Wed Feb 26 19:27:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Krakauer X-Patchwork-Id: 13993068 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-pj1-f74.google.com (mail-pj1-f74.google.com [209.85.216.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 95A4C239597 for ; Wed, 26 Feb 2025 19:28:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740598111; cv=none; b=IK2/Sc0btm5yzQn3otLVQm19DFliCOXUOOnTTf8prRwgNOeOPiTz70lDzm1OX7bvoDlNQXlt6NRzyJIB/+GPG3enoDnBkb/GztI1ZBWJGAcKZ0i6PpzMA2AqlLVainJUu+OQpppg4zRv0XEnn+wynUvQhPXrItwYKz1m09CpTd8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740598111; c=relaxed/simple; bh=tZ4mEjz0mMBNAvIEKtBrdqpxwP3sR5OVhL8PyV1SRr8=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=BE7cXZEHJivvJul7FQqQ+cdYxf6kEjs6/Hy8akKzyYzUe1gcVfo174mTUtbqZbM48jXPjeuQadQCiANeokvZk3RqQVaJqG/vT34unOvGAUkFGRqpQIluHJAdLOPCk9g1oDf3joW8em4cxPDty9E6y5xugJo+cWWAtKxjB1ZseXk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--krakauer.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=JaYDl7bj; arc=none smtp.client-ip=209.85.216.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--krakauer.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="JaYDl7bj" Received: by mail-pj1-f74.google.com with SMTP id 98e67ed59e1d1-2fc1eadf5a8so349191a91.3 for ; Wed, 26 Feb 2025 11:28:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1740598110; x=1741202910; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=EAHfytQNUsiD5c8K+E1ZBkdfL4DOZcpSAfUWQ+cotG0=; b=JaYDl7bjX5h0huLcAR1OIKmxjCo9+3BOJW4FfQeY7V0kDeGvNWRtTCBQ8DUUco/W/3 0hp+RPfL5nQXwbB78Uzq4ijgG+T6IVGen0M9WNxSzsJnp7f+7YcPjKIND7viHySSwA9G SwYG/XklvpZbx25GurISQmV4kfWvKOGUi0Rmhwjcrr5r4fd8vAUdb0K0FqFR+MryYp0f ThbuOPbr1Rg2qAmnnanuvDfV+v+y/WwZ71KlOlo7TOOJpQJ0YrQMzPvS3FmrGfWg9WHK Y2syXJMs2cGBy6/4gy/sBlMV/Y3uZcXxH7bJsHqfkqlORW17PP2TeLhRIbYAJykYjqjS HxsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740598110; x=1741202910; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=EAHfytQNUsiD5c8K+E1ZBkdfL4DOZcpSAfUWQ+cotG0=; b=JbDQJMHc4UpWgHRkT6QyPnKvQhjjmioZbEQE0OjuZzzEltahCPO6SEwqDcABbgxRaf dJGTpPhSxMF7OAkFq9eU7fjMHl+ucJZ1Rr0DIdxQfZKWZLmt3A/kp1+RIK2CtsLuKP2e URowWe7pXCDzLQ0+MzPAo7x5ukB84rOyauMCQ9oA14oX+HYj1X1xKZOR71o3NLHZAqch EaALkZDinNtiouDnwlsQ3y5cwB8gBFZ8grWIqurubZnUa4owxmCKsQA3fsl4g/gR54A1 XVLc8bj6CUAljSqeaDNNH5IKxJ9pizMLrFlODrB8hBjoORnoRloyj9keNObFgDlTauqT Gx9Q== X-Gm-Message-State: AOJu0YyNfmYZBR0yCdXCdeX5gZoNiFX8yci24tLDM1m9ZSCXPoXWNlXc Jd8uefXJGe54PJizls5VSBK9cuZFdSPyA08a/qqNJyhndeAPb8rRvaxeW4vzMK6F10ZLeEu21zc KC2J4Ob0mbhs/HxGuPbhCn0hIj0vhqeWiv+ZqH2Ra41rfQsVQdl5cItr+9uNekfvJ/3NCrHjJoW IBOu8fS8clXTmxAo54DiZILGe9NZmimpyY+Teg5f8+lw== X-Google-Smtp-Source: AGHT+IHnpgBcjLWJK3P1K4UEwO48PptHkVPMDaQtRyrbfS1CeCFR9+JXWBlM+SMFre4xrXqt/dk+pNsU4kVPXg== X-Received: from pjbsg17.prod.google.com ([2002:a17:90b:5211:b0:2fa:2661:76ac]) (user=krakauer job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:2d88:b0:2ea:5dea:eb0a with SMTP id 98e67ed59e1d1-2fe7e2e0f5dmr6628296a91.4.1740598109628; Wed, 26 Feb 2025 11:28:29 -0800 (PST) Date: Wed, 26 Feb 2025 11:27:24 -0800 In-Reply-To: <20250226192725.621969-1-krakauer@google.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20250226192725.621969-1-krakauer@google.com> X-Mailer: git-send-email 2.48.1.658.g4767266eb4-goog Message-ID: <20250226192725.621969-3-krakauer@google.com> Subject: [PATCH v2 2/3] selftests/net: only print passing message in GRO tests when tests pass From: Kevin Krakauer To: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Shuah Khan , linux-kernel@vger.kernel.org, Kevin Krakauer X-Patchwork-Delegate: kuba@kernel.org 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 --- 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; } From patchwork Wed Feb 26 19:27:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Krakauer X-Patchwork-Id: 13993069 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-pj1-f74.google.com (mail-pj1-f74.google.com [209.85.216.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F617239597 for ; Wed, 26 Feb 2025 19:28:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740598115; cv=none; b=H/T+VsqZP8S4Kpz1RcXJxMcRFhrDIMCCNerAcPfXHGu5UKVt0t1tZgS3V4D6AyTYjPviFVYWTCm4HjSCghXF54bLv4gNBHlIYJPjVZZSKgHBi6lq9A36msyblaj/ov1Coe0exxXqGeS4MPLowHg2SZWqJVJe9z4tI3Q0LJe3zn4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740598115; c=relaxed/simple; bh=HluyNYKDPS3yqo3t8x10fv0NM56bpm3mbUtXPJiO218=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=AHqZ1Zyuw63+hXIicDorgRSEOqVHVCZQ9x2TJDQzZvhHyOG4XpK102mdQQ7scGieXGSyPURJTajNK3nDwZQn82vvnDODP5F3jP+jHJaPbTgZ8fU9alWKWN/MNTv2svV4nub2tfEOYI88WAPVRHJ28i7Nox5SKy+VwBEpI8Fru90= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--krakauer.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=0x8LXeVx; arc=none smtp.client-ip=209.85.216.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--krakauer.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="0x8LXeVx" Received: by mail-pj1-f74.google.com with SMTP id 98e67ed59e1d1-2fc2b258e82so387690a91.0 for ; Wed, 26 Feb 2025 11:28:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1740598113; x=1741202913; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=4HpZI8xRryv6g8FTanFu9SU8gg3zdTSULVs1dwlkDW4=; b=0x8LXeVx0vs+elJ7t7Y/Rp2t0gCScn2ZaaBHf6i3y+rhb1JiJoVOWvIEOaug5ZT1A/ VdR/XV91ahTNfDoKSHHVBO4lEtUQVh+UlonriwXX0RL15CzwDvzGlrMKPEpQy/z42rFh lAaiH2JfmSmVTdWU3Enslkw35aoPTw4LcitKg8j0+uaZEDNFseqPFdzNH7FdfmDUQKFZ e2cEhAMbz59SGmAPtV1xOC6OTF04ScXpq+aQM39WLfp+Iikw3RXZ7diovuneQrZCSQ4+ /sZIC5Ggq9Yl11loQeWXvtQKWrVPU9KHbgfRDwkgvvLwHNoFvZOuy7PeY2uxw827omf4 qjSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740598113; x=1741202913; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4HpZI8xRryv6g8FTanFu9SU8gg3zdTSULVs1dwlkDW4=; b=vuYQOBxFZXMZTZSb4ry4s9L22AC+0kxPEuMZbPK533MZq9sfQMolsccDxkzavX+4sM P/fnbKYVPJu1yTyk7yhHJjRT2EiAYEiAuEYleJFgTmlJOucZKp7HejS+KeTDCXxEelk8 jP8W62PzPQrFHU2qBNNXmvRdT/xyAFk8TOxkZxWHp5DP0gMspPVEJgOGH8VrqClaxM/F uHKBB6qW36HHzCEHfIG05u0l5Qqqmi+tlrB5xAlDNc7f5TRBuOwdWwMKePN01UAT5KY1 ZLlY4t+ojczOe3z0JrKhh58l6ghZg65q2tbxRLp0BOFJBKqnVMKFQ6ew0aDptXO04bt8 E1UQ== X-Gm-Message-State: AOJu0YyD9P4+fl9yVXdCL5dQohaVo07wKbHTsZU027nxjbT8VB6nfh/l lEz8KaV6uOVIpzQpXqIqMVq3s2aM5+JmddX2lr4KzAIKqITvx9B/eID/3dss/MoXPWebms5j+A/ wpYjeGNSBn9CV7gwUQkHxSdxMT5lW5REeM6bi5lVbDWMMiXd0eBCPFa3lFUlTDddStN4uS4wUNx 3FcxmLeCt2k5cfZPDA8BuCZXmjPA0cHsrXFfFDSg2FEA== X-Google-Smtp-Source: AGHT+IFamKsEIxS3hTVFncv5CtlIUj3ZMQ5fhZAA0nlmJ8T2PdSmaceymwgTxy7txezIrqrqgE/2n3/ypIdyBw== X-Received: from pjuj12.prod.google.com ([2002:a17:90a:d00c:b0:2fc:1356:bcc3]) (user=krakauer job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:5686:b0:2ee:ee5e:42fb with SMTP id 98e67ed59e1d1-2fe7e2f795fmr7199088a91.13.1740598112745; Wed, 26 Feb 2025 11:28:32 -0800 (PST) Date: Wed, 26 Feb 2025 11:27:25 -0800 In-Reply-To: <20250226192725.621969-1-krakauer@google.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20250226192725.621969-1-krakauer@google.com> X-Mailer: git-send-email 2.48.1.658.g4767266eb4-goog Message-ID: <20250226192725.621969-4-krakauer@google.com> Subject: [PATCH v2 3/3] selftests/net: deflake GRO tests From: Kevin Krakauer To: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Shuah Khan , linux-kernel@vger.kernel.org, Kevin Krakauer X-Patchwork-Delegate: kuba@kernel.org GRO tests are timing dependent and can easily flake. This is partially mitigated in gro.sh by giving each subtest 3 chances to pass. However, this still flakes on some machines. Reduce the flakiness by: - Bumping retries to 6. - Setting napi_defer_hard_irqs to 1 to reduce the chance that GRO is flushed prematurely. This also lets us reduce the gro_flush_timeout from 1ms to 100us. Tested: Ran `gro.sh -t large` 1000 times. There were no failures with this change. Ran inside strace to increase flakiness. Signed-off-by: Kevin Krakauer --- tools/testing/selftests/net/gro.sh | 4 ++-- tools/testing/selftests/net/setup_veth.sh | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/net/gro.sh b/tools/testing/selftests/net/gro.sh index aabd6e5480b8..9e3f186bc2a1 100755 --- a/tools/testing/selftests/net/gro.sh +++ b/tools/testing/selftests/net/gro.sh @@ -18,10 +18,10 @@ run_test() { "--smac" "${CLIENT_MAC}" "--test" "${test}" "--verbose" ) setup_ns - # Each test is run 3 times to deflake, because given the receive timing, + # Each test is run 6 times to deflake, because given the receive timing, # not all packets that should coalesce will be considered in the same flow # on every try. - for tries in {1..3}; do + for tries in {1..6}; do # Actual test starts here ip netns exec $server_ns ./gro "${ARGS[@]}" "--rx" "--iface" "server" \ 1>>log.txt & diff --git a/tools/testing/selftests/net/setup_veth.sh b/tools/testing/selftests/net/setup_veth.sh index 1f78a87f6f37..eb3182066d12 100644 --- a/tools/testing/selftests/net/setup_veth.sh +++ b/tools/testing/selftests/net/setup_veth.sh @@ -11,7 +11,8 @@ setup_veth_ns() { local -r ns_mac="$4" [[ -e /var/run/netns/"${ns_name}" ]] || ip netns add "${ns_name}" - echo 1000000 > "/sys/class/net/${ns_dev}/gro_flush_timeout" + echo 100000 > "/sys/class/net/${ns_dev}/gro_flush_timeout" + echo 1 > "/sys/class/net/${ns_dev}/napi_defer_hard_irqs" ip link set dev "${ns_dev}" netns "${ns_name}" mtu 65535 ip -netns "${ns_name}" link set dev "${ns_dev}" up