]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: Add support to nettest to run both client and server
authorDavid Ahern <dsahern@gmail.com>
Thu, 14 Jan 2021 03:09:41 +0000 (20:09 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 15 Jan 2021 00:26:48 +0000 (16:26 -0800)
commit7794608ef8689367ec1a1f414c20aaed2d246808
tree14cfeb25b6a3a6ad75fe6de3b42aca66f37affc5
parentd9eacd76f05c0b31fdd6fe0a0b701b4111876c88
selftests: Add support to nettest to run both client and server

Add option to nettest to run both client and server within a
single instance. Client forks a child process to run the server
code. A pipe is used for the server to tell the client it has
initialized and is ready or had an error. This avoid unnecessary
sleeps to handle such race when the commands are separately launched.

Signed-off-by: Seth David Schoen <schoen@loyalty.org>
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/nettest.c