Home
last modified time | relevance | path

Searched hist:"247 f0ec361b7e0c5c67db8222873182fb8be5146" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/tools/testing/selftests/bpf/prog_tests/
H A Dtcpbpf_user.cdiff 247f0ec361b7e0c5c67db8222873182fb8be5146 Tue Nov 03 15:34:56 CST 2020 Alexander Duyck <alexanderduyck@fb.com> selftests/bpf: Drop python client/server in favor of threads

Drop the tcp_client/server.py files in favor of using a client and server
thread within the test case. Specifically we spawn a new thread to play the
role of the server, and the main testing thread plays the role of client.

Add logic to the end of the run_test function to guarantee that the sockets
are closed when we begin verifying results.

Doing this we are able to reduce overhead since we don't have two python
workers possibly floating around. In addition we don't have to worry about
synchronization issues and as such the retry loop waiting for the threads
to close the sockets can be dropped as we will have already closed the
sockets in the local executable and synchronized the server thread.

Signed-off-by: Alexander Duyck <alexanderduyck@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/160443929638.1086697.2430242340980315521.stgit@localhost.localdomain