linux/tools/testing
Felix Maurer 8c0be0631d selftests: bpf: Fix bind on used port
The bind_perm BPF selftest failed when port 111/tcp was already in use
during the test. To fix this, the test now runs in its own network name
space.

To use unshare, it is necessary to reorder the includes. The style of
the includes is adapted to be consistent with the other prog_tests.

v2: Replace deprecated CHECK macro with ASSERT_OK

Fixes: 8259fdeb30 ("selftests/bpf: Verify that rebinding to port < 1024 from BPF works")
Signed-off-by: Felix Maurer <fmaurer@redhat.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com>
Link: https://lore.kernel.org/bpf/551ee65533bb987a43f93d88eaf2368b416ccd32.1642518457.git.fmaurer@redhat.com
2022-01-20 14:32:00 -08:00
..
cxl tools/testing/cxl: Introduce a mock memory device + driver 2021-09-21 14:09:34 -07:00
fault-injection
ktest
kunit kunit: tool: Default --jobs to number of CPUs 2021-12-15 16:44:55 -07:00
nvdimm
radix-tree tools: Fix math.h breakage 2021-11-30 09:14:42 -08:00
scatterlist
selftests selftests: bpf: Fix bind on used port 2022-01-20 14:32:00 -08:00
vsock vsock_diag_test: remove free_sock_stat() call in test_no_sockets 2021-10-15 17:21:34 -07:00