From nobody Fri Oct 3 07:40:36 2025 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A907E306D20; Thu, 4 Sep 2025 10:11:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756980715; cv=none; b=XxdokQzZXIq4KY/WEeAWT6t9ZNq2OnErLllv93KIIyQBbeua/x8KIWrYxA8h92aBNYhhsMqBLVOPtoKy5Guvk0SDBmWtfqidbFxjFU9fDhMRypvfxMqtYqGHBwMW4EVTh4+Ujh7D6u8vQEhVnpQ+znipqk2HR13EmPUzQCTNMSw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756980715; c=relaxed/simple; bh=HRwsiSj4vJG+G2w2IpXaxfe0erq1JdDl/4g84nFjHO0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=KPJCOiBREp2UipUlAs0+jaJOTBNbueLguJLTouI36/Kp0S+qcZTWgNPQOjrUZv1ddSWhcSdWUA5DYr+y5AjWXU57gjMWNZSSXhWWDC05F6hWylPYN+sJbD88sAegi/+d9UzfNkl0Ox2xDGARGdYzGLMM3Smeu91oamVcmTZ4no8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=SxZuCOLe; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="SxZuCOLe" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 17DC8C8EC7D; Thu, 4 Sep 2025 10:11:37 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 3EC7A606BB; Thu, 4 Sep 2025 10:11:52 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 1DD261C22C4B7; Thu, 4 Sep 2025 12:11:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1756980710; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=FDf4e65dsCmEIhVXgeN+NiFb4jHvxbOeWZTRGF1cW2k=; b=SxZuCOLeNshJHG/5Q5DcKIkd5GF/Rtxzi2jAa6d1OIAJUFLbdZLv3OQP4LYkY4keVewWMf Xbj6RaorJo1xi3u5A74YbyGz0WfYaQToCKIrgNgE/xcS9skUqZuQS3Fd0kwcZ4dj4JWTO6 ZWQmjWcbWGp/GxO7B+2DCeryGL36XA1L26iZoIvtTGyinLwDzWwdPAYIN55gI7RneNc6ov C05u7VAWhYw61MjQi/B7ucXGbiqMxHUwR+LNuGYQL9prCNU9xBk3zSKDziAs6bxb4/dp5U QvK/7ZWZOfsIjSf15tK2a6QvWUKXayrzP3YZrbk+ybNAXZir88Ojopf366Qknw== From: "Bastien Curutchet (eBPF Foundation)" Date: Thu, 04 Sep 2025 12:10:28 +0200 Subject: [PATCH bpf-next v3 13/14] selftests/bpf: test_xsk: Isolate flaky tests Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250904-xsk-v3-13-ce382e331485@bootlin.com> References: <20250904-xsk-v3-0-ce382e331485@bootlin.com> In-Reply-To: <20250904-xsk-v3-0-ce382e331485@bootlin.com> To: =?utf-8?q?Bj=C3=B6rn_T=C3=B6pel?= , Magnus Karlsson , Maciej Fijalkowski , Jonathan Lemon , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer Cc: Thomas Petazzoni , Alexis Lothore , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, "Bastien Curutchet (eBPF Foundation)" X-Mailer: b4 0.14.2 X-Last-TLS-Session-Version: TLSv1.3 Some tests are flaky and fail from time to time on virtual interfaces. Adding them to the CI would trigger lots of 'false' errors. Remove the flaky tests from the nominal tests table so they won't be run by the CI in upcoming patch. Create a flaky_tests table to hold them. Use this flaky table in xskxceiver.c to keep all the tests available from the test_xsk.sh script. Signed-off-by: Bastien Curutchet (eBPF Foundation) --- tools/testing/selftests/bpf/test_xsk.h | 8 ++++++-- tools/testing/selftests/bpf/xskxceiver.c | 15 +++++++++++---- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/tools/testing/selftests/bpf/test_xsk.h b/tools/testing/selftes= ts/bpf/test_xsk.h index b068b25ea5da728fad1e17b894d6a1b1c9794f74..b86694d0eef53521e2f245670bb= c8176991466bd 100644 --- a/tools/testing/selftests/bpf/test_xsk.h +++ b/tools/testing/selftests/bpf/test_xsk.h @@ -272,7 +272,6 @@ static const struct test_spec tests[] =3D { {.name =3D "XDP_SHARED_UMEM", .test_func =3D testapp_xdp_shared_umem}, {.name =3D "XDP_METADATA_COPY", .test_func =3D testapp_xdp_metadata}, {.name =3D "XDP_METADATA_COPY_MULTI_BUFF", .test_func =3D testapp_xdp_met= adata_mb}, - {.name =3D "SEND_RECEIVE_9K_PACKETS", .test_func =3D testapp_send_receive= _mb}, {.name =3D "SEND_RECEIVE_UNALIGNED_9K_PACKETS", .test_func =3D testapp_send_receive_unaligned_mb}, {.name =3D "ALIGNED_INV_DESC_MULTI_BUFF", .test_func =3D testapp_aligned_= inv_desc_mb}, @@ -282,9 +281,14 @@ static const struct test_spec tests[] =3D { {.name =3D "HW_SW_MAX_RING_SIZE", .test_func =3D testapp_hw_sw_max_ring_s= ize}, {.name =3D "XDP_ADJUST_TAIL_SHRINK", .test_func =3D testapp_adjust_tail_s= hrink}, {.name =3D "XDP_ADJUST_TAIL_SHRINK_MULTI_BUFF", .test_func =3D testapp_ad= just_tail_shrink_mb}, - {.name =3D "XDP_ADJUST_TAIL_GROW", .test_func =3D testapp_adjust_tail_gro= w}, {.name =3D "XDP_ADJUST_TAIL_GROW_MULTI_BUFF", .test_func =3D testapp_adju= st_tail_grow_mb}, {.name =3D "TX_QUEUE_CONSUMER", .test_func =3D testapp_tx_queue_consumer}, }; =20 +static const struct test_spec flaky_tests[] =3D { + {.name =3D "XDP_ADJUST_TAIL_GROW", .test_func =3D testapp_adjust_tail_gro= w}, + {.name =3D "SEND_RECEIVE_9K_PACKETS", .test_func =3D testapp_send_receive= _mb}, +}; + + #endif /* TEST_XSK_H_ */ diff --git a/tools/testing/selftests/bpf/xskxceiver.c b/tools/testing/selft= ests/bpf/xskxceiver.c index 68aa3317dfc62cd4deac07f2d58fefd55770775f..0d8e240864c747253d72319efee= cd46f0fdeff03 100644 --- a/tools/testing/selftests/bpf/xskxceiver.c +++ b/tools/testing/selftests/bpf/xskxceiver.c @@ -311,10 +311,13 @@ static void print_tests(void) printf("Tests:\n"); for (i =3D 0; i < ARRAY_SIZE(tests); i++) printf("%u: %s\n", i, tests[i].name); + for (i =3D ARRAY_SIZE(tests); i < ARRAY_SIZE(tests) + ARRAY_SIZE(flaky_te= sts); i++) + printf("%u: %s\n", i, flaky_tests[i - ARRAY_SIZE(tests)].name); } =20 int main(int argc, char **argv) { + const size_t total_tests =3D ARRAY_SIZE(tests) + ARRAY_SIZE(flaky_tests); struct pkt_stream *rx_pkt_stream_default; struct pkt_stream *tx_pkt_stream_default; struct ifobject *ifobj_tx, *ifobj_rx; @@ -342,7 +345,7 @@ int main(int argc, char **argv) print_tests(); ksft_exit_xpass(); } - if (opt_run_test !=3D RUN_ALL_TESTS && opt_run_test >=3D ARRAY_SIZE(tests= )) { + if (opt_run_test !=3D RUN_ALL_TESTS && opt_run_test >=3D total_tests) { ksft_print_msg("Error: test %u does not exist.\n", opt_run_test); ksft_exit_xfail(); } @@ -382,7 +385,7 @@ int main(int argc, char **argv) test.rx_pkt_stream_default =3D rx_pkt_stream_default; =20 if (opt_run_test =3D=3D RUN_ALL_TESTS) - nb_tests =3D ARRAY_SIZE(tests); + nb_tests =3D total_tests; else nb_tests =3D 1; if (opt_mode =3D=3D TEST_MODE_ALL) { @@ -404,11 +407,15 @@ int main(int argc, char **argv) if (opt_mode !=3D TEST_MODE_ALL && i !=3D opt_mode) continue; =20 - for (j =3D 0; j < ARRAY_SIZE(tests); j++) { + for (j =3D 0; j < total_tests; j++) { if (opt_run_test !=3D RUN_ALL_TESTS && j !=3D opt_run_test) continue; =20 - test_init(&test, ifobj_tx, ifobj_rx, i, &tests[j]); + if (j < ARRAY_SIZE(tests)) + test_init(&test, ifobj_tx, ifobj_rx, i, &tests[j]); + else + test_init(&test, ifobj_tx, ifobj_rx, i, + &flaky_tests[j - ARRAY_SIZE(tests)]); run_pkt_test(&test); usleep(USLEEP_MAX); =20 --=20 2.50.1