Skip to content

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

Open
vineetgarc wants to merge 1 commit into
mainfrom
normalize-subtest-prefix
Open

normalize_bpf_test_names: don't drop tests that share a name prefix#228
vineetgarc wants to merge 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
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.

1 participant