The network topology is held by the config[] table. This 'config' name
is a bit too generic if we want to add other configuration variables.
Rename config[] to net_config[].
Acked-by: Stanislav Fomichev
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftests/bpf/
e BPF configuration to the test itself.
Split the test description in two parts, first the description of the
network topology, then the description of the test case.
Remove the veth indexes from the ASCII art as dynamic ones are used
Acked-by: Stanislav Fomichev
Signed-off-by: Bastien Curutchet (eBPF Found
used as an offset in the network configuration table.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/prog_tests/test_xdp_veth.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/bpf/prog_tests
check_ping() directly returns a SYS_NOFAIL without any previous
treatment. It's called only once in the file and hardcodes the used
namespace and ip address.
Replace check_ping() with a direct call of SYS_NOFAIL in the test.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/te
each test.
Set a fixed size to remote_addr field so the struct veth_configuration
can also have a fixed size.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftests/bpf/prog_tests/test_xdp_veth.c | 51 ++
1 file changed, 33 insertions(+), 18 deletions
The XDP redirection is tested without any flag provided to the
xdp_attach() function.
Add two subtests that check the correct behaviour with
XDP_FLAGS_{DRV/SKB}_MODE flags
Acked-by: Stanislav Fomichev
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftests/bpf/prog_tests
given veth pair.
Use bpf_object__find_program_by_name() / bpf_xdp_attach() API instead of
bpf_program__attach_xdp() to retrieve the BPF programs from their names.
Detach BPF progs in the cleanup() as it's not automatically done by this
API.
Acked-by: Stanislav Fomichev
Signed-off-by: Bastien Curu
ed-by: Stanislav Fomichev
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftests/bpf/progs/xdp_redirect_multi_kern.c | 41 +++---
1 file changed, 29 insertions(+), 12 deletions(-)
diff --git a/tools/testing/selftests/bpf/progs/xdp_redirect_multi_kern.c
b/tools/te
XDP flags are hardcoded to 0 at attachment.
Add flags attributes to the struct prog_configuration to allow flag
modifications for each test case.
Acked-by: Stanislav Fomichev
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/prog_tests/test_xdp_veth.c | 14
map to select the broadcast flags.
Use a BPF map with an entry per veth to check whether packets are
received or not
Acked-by: Stanislav Fomichev
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftests/bpf/prog_tests/test_xdp_veth.c | 150 +
.../testing
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/Makefile | 2 -
.../selftests/bpf/test_xdp_redirect_multi.sh | 214 ---
tools/testing/selftests/bpf/xdp_redirect_multi.c | 226 -
3 files changed, 442
ulti.sh
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
Changes in v4:
- Remove the NO_IP #define
- append_tid() takes string's size as input to ensure there is enough
space to fit the thread ID at the end
- Fix PATCH 12's commit log
- Link to v3:
https://lore.kernel.org/r/202
Some tests can't be run in parallel because they use same namespace
names or veth names.
Create an helper that appends the thread ID to a given string. 8
characters are used for it (7 digits + '\0')
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testin
IP_CMD_MAX_LEN and NS_SUFFIX_LEN aren't used anywhere.
Remove these unused defines
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/prog_tests/test_xdp_veth.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/tools/testing/selftests/bpf/prog_
BPF map.
Use a BPF program that stores the source MAC of received packets in a
map to check the test results.
Acked-by: Stanislav Fomichev
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftests/bpf/prog_tests/test_xdp_veth.c | 125 +
.../testing/selftests
sed scripts and their Makefile entries.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/Makefile| 4 +--
tools/testing/selftests/bpf/with_addr.sh| 54 -
tools/testing/selftests/bpf/with_tunnels.sh | 36 -
er to ensure the uniqueness of this
namespace's name during parallel runs.
Remove the use of the append_tid() on the veth names as they now belong
to an already unique namespace.
Simplify cleanup_network() by directly deleting the namespaces
Signed-off-by: Bastien Curutchet (eBPF
ributes in upcoming patch.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftests/bpf/prog_tests/test_xdp_veth.c | 108 +++--
1 file changed, 59 insertions(+), 49 deletions(-)
diff --git a/tools/testing/selftests/bpf/prog_tests/test_xdp_veth.c
b/tools/testing
8f5d07b9a ("rtnetlink:
fix netns leak with rtnl_setlink()") in the net tree.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
Changes in v5:
- Remove the patches that were applied from previous iteration
- Add PATCH 1 & 2 to avoid using the root namespace so the veth indexes
don
ed-by: Stanislav Fomichev
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftests/bpf/progs/xdp_redirect_multi_kern.c | 41 +++---
1 file changed, 29 insertions(+), 12 deletions(-)
diff --git a/tools/testing/selftests/bpf/progs/xdp_redirect_multi_kern.c
b/tools/te
map to select the broadcast flags.
Use a BPF map with an entry per veth to check whether packets are
received or not
Acked-by: Stanislav Fomichev
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftests/bpf/prog_tests/test_xdp_veth.c | 157 +
.../testing
BPF map.
Use a BPF program that stores the source MAC of received packets in a
map to check the test results.
Acked-by: Stanislav Fomichev
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftests/bpf/prog_tests/test_xdp_veth.c | 132 +
.../testing/selftests
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/Makefile | 2 -
.../selftests/bpf/test_xdp_redirect_multi.sh | 214 ---
tools/testing/selftests/bpf/xdp_redirect_multi.c | 226 -
3 files changed, 442
ection name to load the BPF program.
Reviewed-by: Alexis Lothoré (eBPF Foundation)
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/progs/test_xdp_redirect.c | 4 ++--
tools/testing/selftests/bpf/test_xdp_redirect.sh | 4 ++--
2 files changed, 4 insertio
entry.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/Makefile | 1 -
.../selftests/bpf/prog_tests/xdp_do_redirect.c | 165 +
tools/testing/selftests/bpf/test_xdp_redirect.sh | 79 --
3 files changed, 165 inser
ts the DRV mode.
The patch series adds two new test cases in prog_tests/xdp_do_redirect.c
to replace the test_xdp_redirect.sh script.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
Changes in v2:
- Use directly skel->progs instead of 'bpf_object__find_program_by_name()'
-
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftests/bpf/prog_tests/xdp_do_redirect.c | 7 +++---
.../selftests/bpf/progs/test_xdp_do_redirect.c | 12 ++
.../selftests/bpf/progs/test_xdp_redirect.c| 26 --
3 files changed, 15 insertions
d-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftests/bpf/progs/xdp_redirect_multi_kern.c | 41 +++---
1 file changed, 29 insertions(+), 12 deletions(-)
diff --git a/tools/testing/selftests/bpf/progs/xdp_redirect_multi_kern.c
b/tools/testing/selftests/bpf/
XDP flags are hardcoded to 0 at attachment.
Add flags attributes to the struct prog_configuration to allow flag
modifications for each test case.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/prog_tests/test_xdp_veth.c | 14 --
1 file changed
given veth pair.
Use bpf_object__find_program_by_name() / bpf_xdp_attach() API instead of
bpf_program__attach_xdp() to retrieve the BPF programs from their names.
Detach BPF progs in the cleanup() as it's not automatically done by this
API.
Signed-off-by: Bastien Curutchet (eBPF Found
The XDP redirection is tested without any flag provided to the
xdp_attach() function.
Add two subtests that check the correct behaviour with
XDP_FLAGS_{DRV/SKB}_MODE flags
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftests/bpf/prog_tests/test_xdp_veth.c | 27
Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/Makefile | 2 -
.../selftests/bpf/test_xdp_redirect_multi.sh | 214 ---
tools/testing/selftests/bpf/xdp_redirect_multi.c | 226 -
3 files changed, 442 deletions(-)
diff --git a/tools
map to select the broadcast flags.
Use a BPF map with an entry per veth to check whether packets are
received or not
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftests/bpf/prog_tests/test_xdp_veth.c | 149 +
.../testing/selftests/bpf/progs
BPF map.
Use a BPF program that stores the source MAC of received packets in a
map to check the test results.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftests/bpf/prog_tests/test_xdp_veth.c | 123 +
.../testing/selftests/bpf/progs/xdp_redirect_map.c
map to select the broadcast flags.
Use a BPF map with an entry per veth to check whether packets are
received or not
Set the tests to run serially to avoid conflicts with
test_xdp_veth_redirect
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftests/bpf/prog_tests/test_xdp_veth.c
d-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftests/bpf/progs/xdp_redirect_multi_kern.c | 41 +++---
1 file changed, 29 insertions(+), 12 deletions(-)
diff --git a/tools/testing/selftests/bpf/progs/xdp_redirect_multi_kern.c
b/tools/testing/selftests/bpf/
BPF map.
Use a BPF program that stores the source MAC of received packets in a
map to check the test results.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftests/bpf/prog_tests/test_xdp_veth.c | 123 +
.../testing/selftests/bpf/progs/xdp_redirect_map.c
Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/Makefile | 2 -
.../selftests/bpf/test_xdp_redirect_multi.sh | 214 ---
tools/testing/selftests/bpf/xdp_redirect_multi.c | 226 -
3 files changed, 442 deletions(-)
diff --git a/tools
neric and allow to
configure different test cases
- PATCH 6 adds test cases for 'classic' bpf_redirect_map()
- PATCH 7 & 8 covers the broadcast flags
- PATCH 9 covers the XDP egress programs
- PATCH 10 removes test_xdp_redirect_multi.sh
Signed-off-by: Bastien Curutch
e BPF configuration to the test itself.
Split the test description in two parts, first the description of the
network topology, then the description of the test case.
Remove the veth indexes from the ASCII art as dynamic ones are used
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftest
The network topology is held by the config[] table. This 'config' name
is a bit too generic if we want to add other configuration variable.
Rename config[] to net_config[].
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftests/bpf/prog_tests/test_xdp_veth.c
check_ping() doesn't use the struct skeletons it has as input.
Remove the unused input.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/prog_tests/test_xdp_veth.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/self
e BPF configuration to the test itself.
Split the test description in two parts, first the description of the
network topology, then the description of the test case.
Remove the veth indexes from the ASCII art as dynamic ones are used
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftest
neric and allow to
configure different test cases
- PATCH 6 adds test cases for 'classic' bpf_redirect_map()
- PATCH 7 & 8 covers the broadcast flags
- PATCH 9 covers the XDP egress programs
- PATCH 10 removes test_xdp_redirect_multi.sh
Signed-off-by: Bastien Curutch
check_ping() doesn't use the struct skeletons it has as input.
Remove the unused input.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/prog_tests/test_xdp_veth.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/self
The network topology is held by the config[] table. This 'config' name
is a bit too generic if we want to add other configuration variable.
Rename config[] to net_config[].
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftests/bpf/prog_tests/test_xdp_veth.c
given veth pair.
Use bpf_object__find_program_by_name() / bpf_xdp_attach() API instead of
bpf_program__attach_xdp() to retrieve the BPF programs from their names.
Detach BPF progs in the cleanup() as it's not automatically done by this
API.
Signed-off-by: Bastien Curutchet (eBPF Found
XDP flags are hardcoded to 0 at attachment.
Add flags attributes to the struct prog_configuration to allow flag
modifications for each test case.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/prog_tests/test_xdp_veth.c | 14 --
1 file changed
The XDP redirection is tested without any flag provided to the
xdp_attach() function.
Add two subtests that check the correct behaviour with
XDP_FLAGS_{DRV/SKB}_MODE flags
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftests/bpf/prog_tests/test_xdp_veth.c | 27
IP_CMD_MAX_LEN and NS_SUFFIX_LEN aren't used anywhere.
Remove these unused defines
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/prog_tests/test_xdp_veth.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/tools/testing/selftests/bpf/prog_
Some tests can't be run in parallel because they use same namespace
names or veth names.
Create an helper that appends the thread ID to a given string. 8
characters are used for it (7 digits + '\0')
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testin
ulti.sh
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
Changes in v3:
- Add append_tid() helper and use unique names to allow parallel testing
- Check create_network()'s return value through ASSERT_OK()
- Remove check_ping() and unused defines
- Change next_veth type (from string
The network topology is held by the config[] table. This 'config' name
is a bit too generic if we want to add other configuration variables.
Rename config[] to net_config[].
Acked-by: Stanislav Fomichev
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftests/bpf/
XDP flags are hardcoded to 0 at attachment.
Add flags attributes to the struct prog_configuration to allow flag
modifications for each test case.
Acked-by: Stanislav Fomichev
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/prog_tests/test_xdp_veth.c | 14
given veth pair.
Use bpf_object__find_program_by_name() / bpf_xdp_attach() API instead of
bpf_program__attach_xdp() to retrieve the BPF programs from their names.
Detach BPF progs in the cleanup() as it's not automatically done by this
API.
Acked-by: Stanislav Fomichev
Signed-off-by: Bastien Curu
e BPF configuration to the test itself.
Split the test description in two parts, first the description of the
network topology, then the description of the test case.
Remove the veth indexes from the ASCII art as dynamic ones are used
Acked-by: Stanislav Fomichev
Signed-off-by: Bastien Curutchet (eBPF Found
used as an offset in the network configuration table.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/prog_tests/test_xdp_veth.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/bpf/prog_tests
check_ping() directly returns a SYS_NOFAIL without any previous
treatment. It's called only once in the file and hardcodes the used
namespace and ip address.
Replace check_ping() with a direct call of SYS_NOFAIL in the test.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/te
each test.
Set a fixed size to remote_addr field so the struct veth_configuration
can also have a fixed size.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftests/bpf/prog_tests/test_xdp_veth.c | 52 ++
1 file changed, 34 insertions(+), 18 deletions
The XDP redirection is tested without any flag provided to the
xdp_attach() function.
Add two subtests that check the correct behaviour with
XDP_FLAGS_{DRV/SKB}_MODE flags
Acked-by: Stanislav Fomichev
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftests/bpf/prog_tests
ed-by: Stanislav Fomichev
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftests/bpf/progs/xdp_redirect_multi_kern.c | 41 +++---
1 file changed, 29 insertions(+), 12 deletions(-)
diff --git a/tools/testing/selftests/bpf/progs/xdp_redirect_multi_kern.c
b/tools/te
BPF map.
Use a BPF program that stores the source MAC of received packets in a
map to check the test results.
Acked-by: Stanislav Fomichev
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftests/bpf/prog_tests/test_xdp_veth.c | 125 +
.../testing/selftests
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/Makefile | 2 -
.../selftests/bpf/test_xdp_redirect_multi.sh | 214 ---
tools/testing/selftests/bpf/xdp_redirect_multi.c | 226 -
3 files changed, 442
map to select the broadcast flags.
Use a BPF map with an entry per veth to check whether packets are
received or not
Set the tests to run serially to avoid conflicts with
test_xdp_veth_redirect
Acked-by: Stanislav Fomichev
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftests/bpf
ection name to load the BPF program.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/progs/test_xdp_redirect.c | 4 ++--
tools/testing/selftests/bpf/test_xdp_redirect.sh | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git
ts the DRV mode.
The patch series adds two new test cases in prog_tests/xdp_do_redirect.c
to replace the test_xdp_redirect.sh script.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
Bastien Curutchet (eBPF Foundation) (3):
selftests/bpf: test_xdp_redirect: Rename BPF sections
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../selftests/bpf/prog_tests/xdp_do_redirect.c | 7 +++---
.../selftests/bpf/progs/test_xdp_do_redirect.c | 12 ++
.../selftests/bpf/progs/test_xdp_redirect.c| 26 --
3 files changed, 15 insertions
entry.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/Makefile | 1 -
.../selftests/bpf/prog_tests/xdp_do_redirect.c | 193 +
tools/testing/selftests/bpf/test_xdp_redirect.sh | 79 -
3 files changed, 193 inser
All the tests use the loopback interface. It prevents from running them
in parallel.
Use the create_and_open_tid_ns() helper to run each test in its own
network namespace.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/prog_tests/tc_links.c | 124
Two subtests use the test_in_netns() function to run the test in a
dedicated network namespace. This can now be done directly through the
test_progs framework with a test name starting with 'ns_'.
Replace the use of test_in_netns() by test_ns_* calls.
Signed-off-by: Bastien Curut
Tests are serialized because they all use the loopback interface.
Replace the 'serial_test_' prefixes with 'test_ns_' to benefit from the
new test_prog feature which creates a dedicated namespace for each test,
allowing them to run in parallel.
Signed-off-by: Bastien Curutc
start with 'ns_'.
One test already has a name starting with 'ns_', so PATCH 1 renames it
to avoid conflicts. PATCH 2 introduces the test_progs 'feature'.
PATCH 3 & 4 convert some tests to use these dedicated namespaces.
Signed-off-by: Bastien Curutchet (eBPF Foundati
Some tests are serialized to prevent interference with others.
Open a dedicated network namespace when a test name starts with 'ns_' to
allow more test parallelization. Use the test name as namespace name to
avoid conflict between namespaces.
Signed-off-by: Bastien Curutchet (eBPF
lict.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/prog_tests/ns_current_pid_tgid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/prog_tests/ns_current_pid_tgid.c
b/tools/testing/selftests/bpf/prog_tests/ns_curr
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../testing/selftests/bpf/prog_tests/test_tunnel.c | 41 +++
tools/testing/selftests/bpf/test_tunnel.sh | 58 --
2 files changed, 41 insertions(+), 58 deletions(-)
diff --git a/tools/testing/selftests/bpf
Fomichev
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../testing/selftests/bpf/prog_tests/test_tunnel.c | 97 ++
tools/testing/selftests/bpf/test_tunnel.sh | 79 --
2 files changed, 97 insertions(+), 79 deletions(-)
diff --git a/tools/testing
: Bastien Curutchet (eBPF Foundation)
---
.../testing/selftests/bpf/prog_tests/test_tunnel.c | 46 +++
tools/testing/selftests/bpf/test_tunnel.sh | 52 --
2 files changed, 46 insertions(+), 52 deletions(-)
diff --git a/tools/testing/selftests/bpf
to
fail depending on the environment they're run on.
Remove test_ip6gre() and test_ip6gretap() from the script.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
Changes in v2:
- Disable DAD through `ip addr` instead of using `sysctl`
---
.../testing/selftests/bpf/prog_tests/test_tun
emove the unnecessary ASSERT_OK() from the tests.
Acked-by: Stanislav Fomichev
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../testing/selftests/bpf/prog_tests/test_tunnel.c | 53 ++
1 file changed, 24 insertions(+), 29 deletions(-)
diff --git a/tools/testing/self
the
migration in the following patches.
PATCH 3 to 9 migrate the tests of gre, ip6gre, erspan, ip6erspan,
geneve, ip6geneve and ip6tnl tunnels.
PATCH 10 removes test_tunnel.sh
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
Changes in v2:
- PATCH 1: Move tc_hook definition to attatch_tc_
stien Curutchet (eBPF Foundation)
---
Changes in v2:
- Move tc_hook definition to attach_tc_prog()
---
.../testing/selftests/bpf/prog_tests/test_tunnel.c | 140 ++---
1 file changed, 66 insertions(+), 74 deletions(-)
diff --git a/tools/testing/selftests/bpf/prog_tests/test_tunnel
Fomichev
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/Makefile | 1 -
tools/testing/selftests/bpf/test_tunnel.sh | 179 -
2 files changed, 180 deletions(-)
diff --git a/tools/testing/selftests/bpf/Makefile
b/tools/testing
: Bastien Curutchet (eBPF Foundation)
---
.../testing/selftests/bpf/prog_tests/test_tunnel.c | 45 ++
tools/testing/selftests/bpf/test_tunnel.sh | 45 --
2 files changed, 45 insertions(+), 45 deletions(-)
diff --git a/tools/testing/selftests/bpf
Fomichev
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../testing/selftests/bpf/prog_tests/test_tunnel.c | 59 +++
tools/testing/selftests/bpf/test_tunnel.sh | 88 --
2 files changed, 59 insertions(+), 88 deletions(-)
diff --git a/tools/testing
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
.../testing/selftests/bpf/prog_tests/test_tunnel.c | 48 +
tools/testing/selftests/bpf/test_tunnel.sh | 49 --
2 files changed, 48 insertions(+), 49 deletions(-)
diff --git a/tools/testing
prog_tests/lwt_seg6local.c file.
While working on the migration I noticed that some routes present in the
script weren't needed so PATCH 1 deletes them and then PATCH 2 migrates
the test into the test_progs framework.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
Bastien Curutchet
e the final packet.
Remove test_lwt_seg6local.sh and its Makefile entry.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/Makefile | 1 -
.../selftests/bpf/prog_tests/lwt_seg6local.c | 176 +
tools/testing/selftest
Some routes in fb00:: are initialized during setup, even though they
aren't needed by the test as the UDP packets will travel through the
lightweight tunnels.
Remove these unnecessary routes.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftest
emove test_lwt_ip_encap.sh and its Makefile entry.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/Makefile | 3 +-
.../selftests/bpf/prog_tests/lwt_ip_encap.c| 540 +
tools/testing/selftests/bpf/test_lwt_ip_encap.sh
__testapp_validate_traffic() calls exit_on_error() on failures. This
exits the program immediately and can lead to memory leaks.
Return TEST_FAILURE instead of calling exit_on_error().
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/xskxceiver.c | 6
bitmap is used before being initialized.
Initialize it to zero before using it.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/xskxceiver.c | 4
1 file changed, 4 insertions(+)
diff --git a/tools/testing/selftests/bpf/xskxceiver.c
b/tools/testing
Some tests introduce memory leaks by not freeing all the pkt_stream
objects they're creating.
Fix these memory leaks.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/xskxceiver.c | 32 +++-
1 file changed, 31 insertions(
xskxceiver depends on kselftests which prevent from integrating it into
the test_progs framework.
Wrap the ksft_*() calls behind macros to ease the future integration into
test_progs.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/xskxceiver.c | 109
init_iface() doesn't have any return value while it can fail. In case of
failure it calls exit_on_error() which will terminate the test
immediately.
Add a return value to init_iface() so errors can be handled more
smoothly.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/te
exit_on_error() is called when gettimeofday() fails. This exits the
program immediately and can lead to memory leaks.
Return TEST_FAILURE instead of calling exit_on_error()
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/xskxceiver.c | 8
1 file
xsk_reattach_xdp calls exit_on_error() on failures. This exits the
program immediately and can lead to memory leaks.
Add a return value to the functions handling XDP attachments to handle
errors more smoothly.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf
ests available to test_progs
PATCH 11 enables kselftest de-activation
PATCH 12 isolates the flaky tests
PATCH 13 integrate the non-flaky tests to the test_progs framework
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
Bastien Curutchet (eBPF Foundation) (13):
selftests/bpf: test_x
test_xsk.c uses the kselftest framework. This isn't compatible with the
test_progs framework.
Add a XSK_SELTFEST define that allows to enable/disable the kselftest
usage.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/Makefile | 2 +-
tools/te
Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/xskxceiver.c | 97 +++-
1 file changed, 71 insertions(+), 26 deletions(-)
diff --git a/tools/testing/selftests/bpf/xskxceiver.c
b/tools/testing/selftests/bpf/xskxceiver.c
index
est_xsk.sh.
Signed-off-by: Bastien Curutchet (eBPF Foundation)
---
tools/testing/selftests/bpf/test_xsk.h | 12
tools/testing/selftests/bpf/xskxceiver.c | 16
2 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/tools/testing/selftests/bpf/test_xsk.h
b/too
1 - 100 of 118 matches
Mail list logo