Commit c8ea653
selftests/bpf: Set expect_errno for cgroup_skb_sk_lookup
EINPROGRESS is skipped in run_lookup_test() in cgroup_skb_sk_lookup
tests, but it is still showed in the log:
./test_progs -t cgroup_skb_sk_lookup -v
run_cgroup_bpf_test:PASS:skel_open_load 0 nsec
run_cgroup_bpf_test:PASS:cgroup_join 0 nsec
run_cgroup_bpf_test:PASS:cgroup_attach 0 nsec
run_lookup_test:PASS:start_server 0 nsec
run_lookup_test:PASS:getsockname 0 nsec
(network_helpers.c:300: errno: Operation now in progress) Failed to \
connect to server
run_lookup_test:PASS:connect_fd_to_fd 0 nsec
run_lookup_test:PASS:connect_to_fd 0 nsec
run_lookup_test:PASS:accept 0 nsec
#51 cgroup_skb_sk_lookup:OK
To fix this, set EINPROGRESS as the expect_errno of network_helper_opts and
pass it to connect_fd_to_fd(). Skip this expect_errno when must_fail is
false too in connect_fd_to_addr().
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>1 parent feec808 commit c8ea653
File tree
2 files changed
+3
-2
lines changed- tools/testing/selftests/bpf
- prog_tests
2 files changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
299 | | - | |
| 299 | + | |
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | | - | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
0 commit comments