Thread (30 messages) 30 messages, 2 authors, 2026-01-31

Re: [PATCH bpf-next v4 14/16] selftests/bpf: Update task_local_storage/task_storage_nodeadlock test

From: Amery Hung <hidden>
Date: 2026-01-31 18:47:54
Also in: bpf

On Fri, Jan 30, 2026 at 9:33 PM [off-list ref] wrote:

commit d58597062a783f7c4b2997c007bb7178b268dd14
Author: Amery Hung [off-list ref]

selftests/bpf: Update task_local_storage/task_storage_nodeadlock test

This commit updates the task_storage_nodeadlock test to check for the new
error codes (-EDEADLK or -ETIMEDOUT) that bpf_task_storage_delete() returns
after the rqspinlock conversion, replacing the previous -EBUSY check.
quoted
Adjsut the error code we are checking against as bpf_task_storage_get()
  ^^^^^^

There's a typo here: "Adjsut" should be "Adjust".
quoted
Adjsut the error code we are checking against as bpf_task_storage_get()
                                                 ^^^^^^^^^^^^^^^^^^^^^^
now returns -EDEADLK or -ETIMEDOUT when deadlock happens.
Should this say bpf_task_storage_delete() instead of bpf_task_storage_get()?
Yes. I will change the commit message.
The test code checks the return value of bpf_task_storage_delete():

    ret = bpf_task_storage_delete(&task_storage,
                                  bpf_get_current_task_btf());
    if (ret == -EDEADLK || ret == -ETIMEDOUT)

Looking at the kernel implementation, bpf_task_storage_get() returns NULL on
failure (not error codes), while bpf_task_storage_delete() propagates integer
error codes from bpf_selem_unlink() which can return -EDEADLK or -ETIMEDOUT
from the rqspinlock.


---
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/21539340647

AI-authorship-score: low
AI-authorship-explanation: The typo 'Adjsut' and incorrect function name reference suggest human error rather than AI generation, which typically produces more precise but sometimes generic content.
issues-found: 2
issue-severity-score: low
issue-severity-explanation: Both issues are commit message errors (typo and wrong function name) that do not affect functionality of the selftest code.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help