mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
selftests/bpf: test_xsk: Isolate non-CI tests
Following tests won't fit in the CI: - XDP_ADJUST_TAIL_* and SEND_RECEIVE_9K_PACKETS because of their flakyness - UNALIGNED_* because they depend on huge page allocations - *_RING_SIZE because they depend on HW rings - TEARDOWN because it's too long Remove these tests from the nominal tests table so they won't be run by the CI in upcoming patch. Create a skip_ci_tests table to hold them. Use this skip_ci table in xskxceiver.c to keep all the tests available from the test_xsk.sh script. Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Signed-off-by: Bastien Curutchet (eBPF Foundation) <bastien.curutchet@bootlin.com> Link: https://lore.kernel.org/r/20251031-xsk-v7-14-39fe486593a3@bootlin.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
committed by
Alexei Starovoitov
parent
7a96615f2e
commit
75fc630867
@@ -254,14 +254,9 @@ static const struct test_spec tests[] = {
|
|||||||
{.name = "POLL_TX", .test_func = testapp_poll_tx},
|
{.name = "POLL_TX", .test_func = testapp_poll_tx},
|
||||||
{.name = "POLL_RXQ_FULL", .test_func = testapp_poll_rxq_tmout},
|
{.name = "POLL_RXQ_FULL", .test_func = testapp_poll_rxq_tmout},
|
||||||
{.name = "POLL_TXQ_FULL", .test_func = testapp_poll_txq_tmout},
|
{.name = "POLL_TXQ_FULL", .test_func = testapp_poll_txq_tmout},
|
||||||
{.name = "SEND_RECEIVE_UNALIGNED", .test_func = testapp_send_receive_unaligned},
|
|
||||||
{.name = "ALIGNED_INV_DESC", .test_func = testapp_aligned_inv_desc},
|
{.name = "ALIGNED_INV_DESC", .test_func = testapp_aligned_inv_desc},
|
||||||
{.name = "ALIGNED_INV_DESC_2K_FRAME_SIZE", .test_func = testapp_aligned_inv_desc_2k_frame},
|
{.name = "ALIGNED_INV_DESC_2K_FRAME_SIZE", .test_func = testapp_aligned_inv_desc_2k_frame},
|
||||||
{.name = "UNALIGNED_INV_DESC", .test_func = testapp_unaligned_inv_desc},
|
|
||||||
{.name = "UNALIGNED_INV_DESC_4001_FRAME_SIZE",
|
|
||||||
.test_func = testapp_unaligned_inv_desc_4001_frame},
|
|
||||||
{.name = "UMEM_HEADROOM", .test_func = testapp_headroom},
|
{.name = "UMEM_HEADROOM", .test_func = testapp_headroom},
|
||||||
{.name = "TEARDOWN", .test_func = testapp_teardown},
|
|
||||||
{.name = "BIDIRECTIONAL", .test_func = testapp_bidirectional},
|
{.name = "BIDIRECTIONAL", .test_func = testapp_bidirectional},
|
||||||
{.name = "STAT_RX_DROPPED", .test_func = testapp_stats_rx_dropped},
|
{.name = "STAT_RX_DROPPED", .test_func = testapp_stats_rx_dropped},
|
||||||
{.name = "STAT_TX_INVALID", .test_func = testapp_stats_tx_invalid_descs},
|
{.name = "STAT_TX_INVALID", .test_func = testapp_stats_tx_invalid_descs},
|
||||||
@@ -272,19 +267,32 @@ static const struct test_spec tests[] = {
|
|||||||
{.name = "XDP_SHARED_UMEM", .test_func = testapp_xdp_shared_umem},
|
{.name = "XDP_SHARED_UMEM", .test_func = testapp_xdp_shared_umem},
|
||||||
{.name = "XDP_METADATA_COPY", .test_func = testapp_xdp_metadata},
|
{.name = "XDP_METADATA_COPY", .test_func = testapp_xdp_metadata},
|
||||||
{.name = "XDP_METADATA_COPY_MULTI_BUFF", .test_func = testapp_xdp_metadata_mb},
|
{.name = "XDP_METADATA_COPY_MULTI_BUFF", .test_func = testapp_xdp_metadata_mb},
|
||||||
{.name = "SEND_RECEIVE_9K_PACKETS", .test_func = testapp_send_receive_mb},
|
|
||||||
{.name = "SEND_RECEIVE_UNALIGNED_9K_PACKETS",
|
|
||||||
.test_func = testapp_send_receive_unaligned_mb},
|
|
||||||
{.name = "ALIGNED_INV_DESC_MULTI_BUFF", .test_func = testapp_aligned_inv_desc_mb},
|
{.name = "ALIGNED_INV_DESC_MULTI_BUFF", .test_func = testapp_aligned_inv_desc_mb},
|
||||||
{.name = "UNALIGNED_INV_DESC_MULTI_BUFF", .test_func = testapp_unaligned_inv_desc_mb},
|
|
||||||
{.name = "TOO_MANY_FRAGS", .test_func = testapp_too_many_frags},
|
{.name = "TOO_MANY_FRAGS", .test_func = testapp_too_many_frags},
|
||||||
{.name = "HW_SW_MIN_RING_SIZE", .test_func = testapp_hw_sw_min_ring_size},
|
|
||||||
{.name = "HW_SW_MAX_RING_SIZE", .test_func = testapp_hw_sw_max_ring_size},
|
|
||||||
{.name = "XDP_ADJUST_TAIL_SHRINK", .test_func = testapp_adjust_tail_shrink},
|
{.name = "XDP_ADJUST_TAIL_SHRINK", .test_func = testapp_adjust_tail_shrink},
|
||||||
{.name = "XDP_ADJUST_TAIL_SHRINK_MULTI_BUFF", .test_func = testapp_adjust_tail_shrink_mb},
|
|
||||||
{.name = "XDP_ADJUST_TAIL_GROW", .test_func = testapp_adjust_tail_grow},
|
|
||||||
{.name = "XDP_ADJUST_TAIL_GROW_MULTI_BUFF", .test_func = testapp_adjust_tail_grow_mb},
|
|
||||||
{.name = "TX_QUEUE_CONSUMER", .test_func = testapp_tx_queue_consumer},
|
{.name = "TX_QUEUE_CONSUMER", .test_func = testapp_tx_queue_consumer},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct test_spec ci_skip_tests[] = {
|
||||||
|
/* Flaky tests */
|
||||||
|
{.name = "XDP_ADJUST_TAIL_SHRINK_MULTI_BUFF", .test_func = testapp_adjust_tail_shrink_mb},
|
||||||
|
{.name = "XDP_ADJUST_TAIL_GROW", .test_func = testapp_adjust_tail_grow},
|
||||||
|
{.name = "XDP_ADJUST_TAIL_GROW_MULTI_BUFF", .test_func = testapp_adjust_tail_grow_mb},
|
||||||
|
{.name = "SEND_RECEIVE_9K_PACKETS", .test_func = testapp_send_receive_mb},
|
||||||
|
/* Tests with huge page dependency */
|
||||||
|
{.name = "SEND_RECEIVE_UNALIGNED", .test_func = testapp_send_receive_unaligned},
|
||||||
|
{.name = "UNALIGNED_INV_DESC", .test_func = testapp_unaligned_inv_desc},
|
||||||
|
{.name = "UNALIGNED_INV_DESC_4001_FRAME_SIZE",
|
||||||
|
.test_func = testapp_unaligned_inv_desc_4001_frame},
|
||||||
|
{.name = "SEND_RECEIVE_UNALIGNED_9K_PACKETS",
|
||||||
|
.test_func = testapp_send_receive_unaligned_mb},
|
||||||
|
{.name = "UNALIGNED_INV_DESC_MULTI_BUFF", .test_func = testapp_unaligned_inv_desc_mb},
|
||||||
|
/* Test with HW ring size dependency */
|
||||||
|
{.name = "HW_SW_MIN_RING_SIZE", .test_func = testapp_hw_sw_min_ring_size},
|
||||||
|
{.name = "HW_SW_MAX_RING_SIZE", .test_func = testapp_hw_sw_max_ring_size},
|
||||||
|
/* Too long test */
|
||||||
|
{.name = "TEARDOWN", .test_func = testapp_teardown},
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif /* TEST_XSK_H_ */
|
#endif /* TEST_XSK_H_ */
|
||||||
|
|||||||
@@ -326,10 +326,13 @@ static void print_tests(void)
|
|||||||
printf("Tests:\n");
|
printf("Tests:\n");
|
||||||
for (i = 0; i < ARRAY_SIZE(tests); i++)
|
for (i = 0; i < ARRAY_SIZE(tests); i++)
|
||||||
printf("%u: %s\n", i, tests[i].name);
|
printf("%u: %s\n", i, tests[i].name);
|
||||||
|
for (i = ARRAY_SIZE(tests); i < ARRAY_SIZE(tests) + ARRAY_SIZE(ci_skip_tests); i++)
|
||||||
|
printf("%u: %s\n", i, ci_skip_tests[i - ARRAY_SIZE(tests)].name);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
const size_t total_tests = ARRAY_SIZE(tests) + ARRAY_SIZE(ci_skip_tests);
|
||||||
struct pkt_stream *rx_pkt_stream_default;
|
struct pkt_stream *rx_pkt_stream_default;
|
||||||
struct pkt_stream *tx_pkt_stream_default;
|
struct pkt_stream *tx_pkt_stream_default;
|
||||||
struct ifobject *ifobj_tx, *ifobj_rx;
|
struct ifobject *ifobj_tx, *ifobj_rx;
|
||||||
@@ -357,7 +360,7 @@ int main(int argc, char **argv)
|
|||||||
print_tests();
|
print_tests();
|
||||||
ksft_exit_xpass();
|
ksft_exit_xpass();
|
||||||
}
|
}
|
||||||
if (opt_run_test != RUN_ALL_TESTS && opt_run_test >= ARRAY_SIZE(tests)) {
|
if (opt_run_test != RUN_ALL_TESTS && opt_run_test >= total_tests) {
|
||||||
ksft_print_msg("Error: test %u does not exist.\n", opt_run_test);
|
ksft_print_msg("Error: test %u does not exist.\n", opt_run_test);
|
||||||
ksft_exit_xfail();
|
ksft_exit_xfail();
|
||||||
}
|
}
|
||||||
@@ -397,7 +400,7 @@ int main(int argc, char **argv)
|
|||||||
test.rx_pkt_stream_default = rx_pkt_stream_default;
|
test.rx_pkt_stream_default = rx_pkt_stream_default;
|
||||||
|
|
||||||
if (opt_run_test == RUN_ALL_TESTS)
|
if (opt_run_test == RUN_ALL_TESTS)
|
||||||
nb_tests = ARRAY_SIZE(tests);
|
nb_tests = total_tests;
|
||||||
else
|
else
|
||||||
nb_tests = 1;
|
nb_tests = 1;
|
||||||
if (opt_mode == TEST_MODE_ALL) {
|
if (opt_mode == TEST_MODE_ALL) {
|
||||||
@@ -419,11 +422,15 @@ int main(int argc, char **argv)
|
|||||||
if (opt_mode != TEST_MODE_ALL && i != opt_mode)
|
if (opt_mode != TEST_MODE_ALL && i != opt_mode)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for (j = 0; j < ARRAY_SIZE(tests); j++) {
|
for (j = 0; j < total_tests; j++) {
|
||||||
if (opt_run_test != RUN_ALL_TESTS && j != opt_run_test)
|
if (opt_run_test != RUN_ALL_TESTS && j != opt_run_test)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (j < ARRAY_SIZE(tests))
|
||||||
test_init(&test, ifobj_tx, ifobj_rx, i, &tests[j]);
|
test_init(&test, ifobj_tx, ifobj_rx, i, &tests[j]);
|
||||||
|
else
|
||||||
|
test_init(&test, ifobj_tx, ifobj_rx, i,
|
||||||
|
&ci_skip_tests[j - ARRAY_SIZE(tests)]);
|
||||||
run_pkt_test(&test);
|
run_pkt_test(&test);
|
||||||
usleep(USLEEP_MAX);
|
usleep(USLEEP_MAX);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user