normalize_bpf_test_names: don't drop tests that share a name prefix - #228
Open
vineetgarc wants to merge 1 commit into
Open
normalize_bpf_test_names: don't drop tests that share a name prefix#228vineetgarc wants to merge 1 commit into
vineetgarc wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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