bpf_common.h: Use errno instead of TST_ERR
PATCH 1/1 bpf_common.h: Use errno instead of TST_ERR
Since it doesn't call TEST, TST_ERR is always equal to 0. Use errno instead of it.
Fixes 5d3a2ec8cf0d ("Fix BPF test program loading issue")
Signed-off-by Yang Xu <[email protected]>
--- testcases/kernel/syscalls/bpf/bpf_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/syscalls/bpf/bpf_common.c +1 -1
@@ -36,7 +36,7 @@ int bpf_map_create(union bpf_attr *attr) TST_RETVAL_GE0);if (ret ==-1 ) { -if (TST_ERR ==EPERM ) { +if (errno ==EPERM ) {tst_res (TCONF ,"Hint: check also /proc/sys/kernel/unprivileged_bpf_disabled" );tst_brk (TCONF |TERRNO ,"bpf() requires CAP_SYS_ADMIN on this system" );
Signature · 1 line
2.18.0
PATCH 1/1 bpf_common.h: Use errno instead of TST_ERR
Hi!
Good catch, applied, thanks.
Signature · 2 lines
Cyril Hrubis [email protected]