linux/tools
Jakub Kicinski 31611cea8f selftests: drv-net: add a TCP ping test case (and useful helpers)
More complex tests often have to spawn a background process,
like a server which will respond to requests or tcpdump.

Add support for creating such processes using the with keyword:

  with bkg("my-daemon", ..):
     # my-daemon is alive in this block

My initial thought was to add this support to cmd() directly
but it runs the command in the constructor, so by the time
we __enter__ it's too late to make sure we used "background=True".

Second useful helper transplanted from net_helper.sh is
wait_port_listen().

The test itself uses socat, which insists on v6 addresses
being wrapped in [], it's not the only command which requires
this format, so add the wrapped address to env. The hope
is to save test code from checking if address is v6.

Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://lore.kernel.org/r/20240420025237.3309296-7-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-04-23 10:13:56 -07:00
..
accounting
arch LoongArch changes for v6.9 2024-03-22 10:22:45 -07:00
bootconfig
bpf Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-03-28 17:25:57 -07:00
build perf: build: introduce the libcapstone 2024-02-20 18:06:25 -08:00
certs
cgroup
counter
crypto crypto: ccp - Update return values for some unit tests 2024-02-24 08:41:20 +08:00
debugging
firewire
firmware
gpio
hv hv/hv_kvp_daemon: Handle IPv4 and Ipv6 combination for keyfile format 2024-04-10 21:25:40 +00:00
iio
include Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-04-11 14:23:47 -07:00
kvm/kvm_stat
laptop
leds
lib Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-03-28 17:25:57 -07:00
memory-model
mm tools/mm: add thpmaps script to dump THP usage info 2024-02-22 10:24:38 -08:00
net/ynl tools/net/ynl: Add multi message support to ynl 2024-04-22 17:20:42 -07:00
objtool objtool: Fix compile failure when using the x32 compiler 2024-03-30 22:12:37 +01:00
pci
pcmcia
perf bitops: make BYTES_TO_BITS() treewide-available 2024-04-01 10:49:27 +01:00
power Turbostat version 2024.04.10 2024-04-10 13:13:27 -07:00
rcu
scripts treewide: remove meaningless assignments in Makefiles 2024-02-23 14:19:07 -08:00
spi
testing selftests: drv-net: add a TCP ping test case (and useful helpers) 2024-04-23 10:13:56 -07:00
thermal
time
tracing tools/rtla: Add -U/--user-load option to timerlat 2024-03-20 05:39:06 +01:00
usb
verification tools/verification: Use tools/build makefiles on rv 2024-03-20 05:39:06 +01:00
virtio tools: virtio: introduce vhost_net_test 2024-03-05 11:38:14 +01:00
wmi
workqueue
Makefile tools/Makefile: remove cgroup target 2024-03-26 11:07:21 -07:00