RE: [PATCH bpf-next 1/8] selftests/bpf: Fix tx_prog_fd values in test_sockmap

2024-05-27 Thread John Fastabend
Geliang Tang wrote: > From: Geliang Tang > > The values of tx_prog_fd in run_options() should not be 0, so set it as -1 > in else branch, and test it using "if (tx_prog_fd > 0)" condition, not > "if (tx_prog_fd)" or "if (tx_prog_fd >= 0)". > > Signed-off-by: Geliang Tang > --- Acked-by: John F

[PATCH bpf-next 1/8] selftests/bpf: Fix tx_prog_fd values in test_sockmap

2024-05-22 Thread Geliang Tang
From: Geliang Tang The values of tx_prog_fd in run_options() should not be 0, so set it as -1 in else branch, and test it using "if (tx_prog_fd > 0)" condition, not "if (tx_prog_fd)" or "if (tx_prog_fd >= 0)". Signed-off-by: Geliang Tang --- tools/testing/selftests/bpf/test_sockmap.c | 6 +++--