]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Fix tests for local_storage
authorKP Singh <kpsingh@google.com>
Fri, 6 Nov 2020 10:37:44 +0000 (10:37 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 6 Nov 2020 16:08:37 +0000 (08:08 -0800)
commit895a11a7429892bf55d47d976e9d64c3013fdee4
tree15a194dca3ab86fe7254b2f14d5c5e2f23382582
parentf6ae604ff27003a9e17d78817e88f44bff103131
bpf: Fix tests for local_storage

The {inode,sk}_storage_result checking if the correct value was retrieved
was being clobbered unconditionally by the return value of the
bpf_{inode,sk}_storage_delete call.

Also, consistently use the newly added BPF_LOCAL_STORAGE_GET_F_CREATE
flag.

Fixes: 99430a072d31 ("bpf: Add selftests for local_storage")
Signed-off-by: KP Singh <kpsingh@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20201106103747.2780972-7-kpsingh@chromium.org
tools/testing/selftests/bpf/progs/local_storage.c