commit 75130d2969168e50252cc473cfaa880a9795c0ef
Author: Kaitao Cheng <[email protected]>

    selftests/bpf: Add test cases for bpf_list_del/add/is_first/is_last/empty

    Extend refcounted_kptr with tests for bpf_list_add (including prev from
    bpf_list_front and bpf_refcount_acquire), bpf_list_del (including node
    from bpf_list_front, bpf_rbtree_remove and bpf_refcount_acquire),
    bpf_list_empty, bpf_list_is_first/last, and push_back on uninit head.

    To verify the validity of bpf_list_del/add, the test also expects the
    verifier to reject calls to bpf_list_del/add made without holding the
    spin_lock.

    Signed-off-by: Kaitao Cheng <[email protected]>

The commit message mentions adding test cases for bpf_list_is_first,
bpf_list_is_last, and bpf_list_empty, but these test functions already
exist in the file and are not added by this patch. The existing tests
are list_empty_test, list_is_edge_test1, list_is_edge_test2, and
list_is_edge_test3.

This patch actually adds:
- list_del_test3 (new test for bpf_list_del with list_front return value)
- list_add_test1 (new test for bpf_list_add after prev node)
- list_add_test2 (new test for bpf_list_add with list_front as prev)
- list_push_back_uninit_head (new test for push_back on uninitialized head)
- list_del_without_lock_fail (negative test for del without lock)
- list_add_without_lock_fail (negative test for add without lock)

Should the commit message be adjusted to accurately reflect which tests
are being added?


---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md

CI run summary: https://github.com/kernel-patches/bpf/actions/runs/26204125015

Reply via email to