From: Yun Lu The test matrix groups targets by the side effect under test. ARRAY_SIZE(mains) gives the number of groups, so using it as the target loop bound skips the two standalone entry-point targets in each group. Use the target and replacement counts from the current group and derive the group count from mains. This restores four packet-data cases and enables four sleepable-program cases. Fixes: 72ed076abf54 ("selftests/bpf: Add tests for extending sleepable global subprogs") Reported-by: Jackie Liu Signed-off-by: Yun Lu --- tools/testing/selftests/bpf/prog_tests/summarization.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/bpf/prog_tests/summarization.c b/tools/testing/selftests/bpf/prog_tests/summarization.c index 3e4bcf071735..f51b203eca8a 100644 --- a/tools/testing/selftests/bpf/prog_tests/summarization.c +++ b/tools/testing/selftests/bpf/prog_tests/summarization.c @@ -116,9 +116,9 @@ void test_summarization_freplace(void) }; char buf[64]; - for (int t = 0; t < 2; t++) { - for (int i = 0; i < ARRAY_SIZE(mains); ++i) { - for (int j = 0; j < ARRAY_SIZE(replacements); ++j) { + for (int t = 0; t < ARRAY_SIZE(mains); t++) { + for (int i = 0; i < ARRAY_SIZE(mains[t]); ++i) { + for (int j = 0; j < ARRAY_SIZE(replacements[t]); ++j) { snprintf(buf, sizeof(buf), "%s_with_%s", mains[t][i].to_be_replaced, replacements[t][j].func); if (!test__start_subtest(buf)) -- 2.43.0