]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/bpf: rbtree: Fix incorrect global variable usage
authorRong Tao <rongtao@cestc.cn>
Thu, 5 Jun 2025 08:45:14 +0000 (16:45 +0800)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 5 Jun 2025 20:55:26 +0000 (13:55 -0700)
commit64a064ce33b193a681f1eb52ac1ad09aadda9944
treee84ed9ebd969380217097b075c44da506613b61d
parenta570f386f3d19aa64fb3764504ac80cddb42e579
selftests/bpf: rbtree: Fix incorrect global variable usage

Within __add_three() function, should use function parameters instead of
global variables. So that the variables groot_nested.inner.root and
groot_nested.inner.glock in rbtree_add_nodes_nested() are tested
correctly.

Signed-off-by: Rong Tao <rongtao@cestc.cn>
Link: https://lore.kernel.org/r/tencent_3DD7405C0839EBE2724AC5FA357B5402B105@qq.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/progs/rbtree.c