aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2019-10-12 14:21:56 -0400
committerDavid S. Miller <davem@davemloft.net>2019-10-12 14:21:56 -0400
commit8caf8a91f34d55e8e3b1355ee8d658cb472146e2 (patch)
tree3d3d88878d6c966c854e857dbd8cec701cd3a347 /tools/testing
parentf0308fb0708078d6c1d8a4d533941a7a191af634 (diff)
parent106c35dda32f8b63f88cad7433f1b8bb0056958a (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
Alexei Starovoitov says: ==================== pull-request: bpf 2019-10-12 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) a bunch of small fixes. Nothing critical. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c2
-rw-r--r--tools/testing/selftests/bpf/prog_tests/tcp_rtt.c3
-rwxr-xr-xtools/testing/selftests/bpf/test_flow_dissector.sh3
-rwxr-xr-xtools/testing/selftests/bpf/test_lwt_ip_encap.sh6
4 files changed, 9 insertions, 5 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c b/tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c
index 6cbeea7b4bf1..8547ecbdc61f 100644
--- a/tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c
+++ b/tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c
@@ -195,7 +195,7 @@ static void run_test(int cgroup_fd)
195 195
196 if (CHECK_FAIL(pthread_create(&tid, NULL, server_thread, 196 if (CHECK_FAIL(pthread_create(&tid, NULL, server_thread,
197 (void *)&server_fd))) 197 (void *)&server_fd)))
198 goto close_bpf_object; 198 goto close_server_fd;
199 199
200 pthread_mutex_lock(&server_started_mtx); 200 pthread_mutex_lock(&server_started_mtx);
201 pthread_cond_wait(&server_started, &server_started_mtx); 201 pthread_cond_wait(&server_started, &server_started_mtx);
diff --git a/tools/testing/selftests/bpf/prog_tests/tcp_rtt.c b/tools/testing/selftests/bpf/prog_tests/tcp_rtt.c
index a82da555b1b0..f4cd60d6fba2 100644
--- a/tools/testing/selftests/bpf/prog_tests/tcp_rtt.c
+++ b/tools/testing/selftests/bpf/prog_tests/tcp_rtt.c
@@ -260,13 +260,14 @@ void test_tcp_rtt(void)
260 260
261 if (CHECK_FAIL(pthread_create(&tid, NULL, server_thread, 261 if (CHECK_FAIL(pthread_create(&tid, NULL, server_thread,
262 (void *)&server_fd))) 262 (void *)&server_fd)))
263 goto close_cgroup_fd; 263 goto close_server_fd;
264 264
265 pthread_mutex_lock(&server_started_mtx); 265 pthread_mutex_lock(&server_started_mtx);
266 pthread_cond_wait(&server_started, &server_started_mtx); 266 pthread_cond_wait(&server_started, &server_started_mtx);
267 pthread_mutex_unlock(&server_started_mtx); 267 pthread_mutex_unlock(&server_started_mtx);
268 268
269 CHECK_FAIL(run_test(cgroup_fd, server_fd)); 269 CHECK_FAIL(run_test(cgroup_fd, server_fd));
270close_server_fd:
270 close(server_fd); 271 close(server_fd);
271close_cgroup_fd: 272close_cgroup_fd:
272 close(cgroup_fd); 273 close(cgroup_fd);
diff --git a/tools/testing/selftests/bpf/test_flow_dissector.sh b/tools/testing/selftests/bpf/test_flow_dissector.sh
index d23d4da66b83..e2d06191bd35 100755
--- a/tools/testing/selftests/bpf/test_flow_dissector.sh
+++ b/tools/testing/selftests/bpf/test_flow_dissector.sh
@@ -63,6 +63,9 @@ fi
63 63
64# Setup 64# Setup
65tc qdisc add dev lo ingress 65tc qdisc add dev lo ingress
66echo 0 > /proc/sys/net/ipv4/conf/default/rp_filter
67echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
68echo 0 > /proc/sys/net/ipv4/conf/lo/rp_filter
66 69
67echo "Testing IPv4..." 70echo "Testing IPv4..."
68# Drops all IP/UDP packets coming from port 9 71# Drops all IP/UDP packets coming from port 9
diff --git a/tools/testing/selftests/bpf/test_lwt_ip_encap.sh b/tools/testing/selftests/bpf/test_lwt_ip_encap.sh
index acf7a74f97cd..59ea56945e6c 100755
--- a/tools/testing/selftests/bpf/test_lwt_ip_encap.sh
+++ b/tools/testing/selftests/bpf/test_lwt_ip_encap.sh
@@ -314,15 +314,15 @@ test_gso()
314 command -v nc >/dev/null 2>&1 || \ 314 command -v nc >/dev/null 2>&1 || \
315 { echo >&2 "nc is not available: skipping TSO tests"; return; } 315 { echo >&2 "nc is not available: skipping TSO tests"; return; }
316 316
317 # listen on IPv*_DST, capture TCP into $TMPFILE 317 # listen on port 9000, capture TCP into $TMPFILE
318 if [ "${PROTO}" == "IPv4" ] ; then 318 if [ "${PROTO}" == "IPv4" ] ; then
319 IP_DST=${IPv4_DST} 319 IP_DST=${IPv4_DST}
320 ip netns exec ${NS3} bash -c \ 320 ip netns exec ${NS3} bash -c \
321 "nc -4 -l -s ${IPv4_DST} -p 9000 > ${TMPFILE} &" 321 "nc -4 -l -p 9000 > ${TMPFILE} &"
322 elif [ "${PROTO}" == "IPv6" ] ; then 322 elif [ "${PROTO}" == "IPv6" ] ; then
323 IP_DST=${IPv6_DST} 323 IP_DST=${IPv6_DST}
324 ip netns exec ${NS3} bash -c \ 324 ip netns exec ${NS3} bash -c \
325 "nc -6 -l -s ${IPv6_DST} -p 9000 > ${TMPFILE} &" 325 "nc -6 -l -p 9000 > ${TMPFILE} &"
326 RET=$? 326 RET=$?
327 else 327 else
328 echo " test_gso: unknown PROTO: ${PROTO}" 328 echo " test_gso: unknown PROTO: ${PROTO}"