]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: Add nettest
authorDavid Ahern <dsahern@gmail.com>
Thu, 1 Aug 2019 18:56:34 +0000 (11:56 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 3 Aug 2019 17:42:04 +0000 (10:42 -0700)
commit3a60c84252876eced6d7c058d20d8d4c68c6f0dd
tree3d12f9faf913ca87c50164d0338bae0c80b1eb1e
parent3a167e6b5fe1480e536f871eb819469cead2df2e
selftests: Add nettest

Add nettest - a simple program with an implementation for various networking
APIs. nettest is used for tcp, udp and raw functional tests for both IPv4
and IPv6.

Point of this command versus existing utilities:
- controlled implementation of the APIs and the order in which they
  are called,
- ability to verify ingress device, local and remote addresses,
- timeout for controlled test length,
- ability to discriminate a timeout from a system call failure, and
- simplicity with test scripts.

The command returns:
  0  on success,
  1  for any system call failure, and
  2  on timeout.

Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/Makefile
tools/testing/selftests/net/nettest.c [new file with mode: 0644]