Commit 339c1f8e authored by Feng Yang's avatar Feng Yang Committed by Alexei Starovoitov
Browse files

selftests/bpf: Fix cap_enable_effective() return code



The caller of cap_enable_effective() expects negative error code.
Fix it.

Before:
  failed to restore CAP_SYS_ADMIN: -1, Unknown error -1

After:
  failed to restore CAP_SYS_ADMIN: -3, No such process
  failed to restore CAP_SYS_ADMIN: -22, Invalid argument

Signed-off-by: default avatarFeng Yang <yangfeng@kylinos.cn>
Acked-by: default avatarEduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20250305022234.44932-1-yangfeng59949@163.com


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 8bda5b78
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment