Skip to content

normalize_bpf_test_names: don't drop tests that share a name prefix - #228

Merged
theihor merged 1 commit into
mainfrom
normalize-subtest-prefix
Aug 11, 2026
Merged

normalize_bpf_test_names: don't drop tests that share a name prefix#228
theihor merged 1 commit into
mainfrom
normalize-subtest-prefix

Conversation

@vineetgarc

Copy link
Copy Markdown
Collaborator

Subtest deduplication compares the subtest against the bare test name with a plain startswith(), so any test whose name begins with the name of another denied test loses its subtest entries. With

linked_list
linked_list_peek/test_back_spinlock_false
linked_list_peek/test_front_spinlock_false

both linked_list_peek entries are dropped, because they start with "linked_list". They are subtests of linked_list_peek, which is an unrelated test, so they end up running after all. In BPF CI this silently un-denied two GCC BPF tests and failed the job.

Compare against "prev/" instead, so only a real subtest is consumed. The '/' in the line no longer needs checking separately: a line starting with "prev/" contains one by construction.

Extend the test with a pair that reproduces this. It has to be a name that sorts immediately after the bare one, otherwise the running "prev" has already moved on to another entry and the comparison never happens, which is why the existing test4 / test4_blah pair does not catch it.

Link: https://github.com/kernel-patches/vmtest/actions/runs/31203330693/job/92951247492

Subtest deduplication compares the subtest against the bare test name with a
plain startswith(), so any test whose name begins with the name of another
denied test loses its subtest entries. With

  linked_list
  linked_list_peek/test_back_spinlock_false
  linked_list_peek/test_front_spinlock_false

both linked_list_peek entries are dropped, because they start with
"linked_list". They are subtests of linked_list_peek, which is an unrelated
test, so they end up running after all. In BPF CI this silently un-denied two
GCC BPF tests and failed the job.

Compare against "prev/" instead, so only a real subtest is consumed. The '/' in
the line no longer needs checking separately: a line starting with "prev/"
contains one by construction.

Extend the test with a pair that reproduces this. It has to be a name that
sorts immediately after the bare one, otherwise the running "prev" has already
moved on to another entry and the comparison never happens, which is why the
existing test4 / test4_blah pair does not catch it.

Link: https://github.com/kernel-patches/vmtest/actions/runs/31203330693/job/92951247492
Signed-off-by: Vineet Gupta <vineet.gupta@linux.dev>
@vineetgarc
vineetgarc requested a review from theihor August 7, 2026 18:50

@theihor theihor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks!

@theihor

theihor commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

I restarted the CI pipeline. Will merge after it finishes.

@theihor
theihor merged commit 386733c into main Aug 11, 2026
33 of 34 checks passed
@vineetgarc
vineetgarc deleted the normalize-subtest-prefix branch August 11, 2026 22:32
vineetgarc added a commit to kernel-patches/vmtest that referenced this pull request Aug 12, 2026
Temporary, do not merge. The v4 tag is from June and predates the fix for
subtest dedup dropping denylist entries whose name is a prefix of another
test's, without which the two linked_list_peek entries of
DENYLIST.test_progs-bpf_gcc are discarded and the job fails.

Only the gcc-bpf.yml pin is bumped: the bare "linked_list" entry that triggers
the collision exists only in the GCC BPF denylist, so no other job is affected.

Drop this once v4 has been re-tagged past libbpf/ci#228.
vineetgarc added a commit to kernel-patches/vmtest that referenced this pull request Aug 12, 2026
Temporary, do not merge. The v4 tag is from June and predates the fix for
subtest dedup dropping denylist entries whose name is a prefix of another
test's, without which the two linked_list_peek entries of
DENYLIST.test_progs-bpf_gcc are discarded and the job fails.

Only the gcc-bpf.yml pin is bumped: the bare "linked_list" entry that triggers
the collision exists only in the GCC BPF denylist, so no other job is affected.

Drop this once v4 has been re-tagged past libbpf/ci#228.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants