Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selftests/bpf: Migrate test_tunnel.sh to test_progs #8567

Closed

Conversation

kernel-patches-daemon-bpf[bot]
Copy link

Pull request for series with
subject: selftests/bpf: Migrate test_tunnel.sh to test_progs
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=938523

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 43d9d43
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=938523
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 42c5e6d
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=938523
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: e4d68c0
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=938523
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 0b93631
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=938523
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 0b93631
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=938523
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 0b93631
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=938523
version: 1

A fair amount of code duplication is present among tests to attach BPF
programs.

Create generic_attach* helpers that attach BPF programs to a given
interface.
Use ASSERT_OK_FD() instead of ASSERT_GE() to check fd's validity.
Use these helpers in all the available tests.

Signed-off-by: Bastien Curutchet (eBPF Foundation) <[email protected]>
All tests use more or less the same ping commands as final validation.
Also test_ping()'s return value is checked with ASSERT_OK() while this
check is already done by the SYS() macro inside test_ping().

Create helpers around test_ping() and use them in the tests to avoid code
duplication.
Remove the unnecessary ASSERT_OK() from the tests.

Signed-off-by: Bastien Curutchet (eBPF Foundation) <[email protected]>
Acked-by: Stanislav Fomichev <[email protected]>
gre tunnels are tested in the test_tunnel.sh but not in the test_progs
framework.

Add a new test in test_progs to test gre tunnels. It uses the same
network topology and the same BPF programs than the script.
Remove test_gre() and test_gre_no_tunnel_key() from the script.

Signed-off-by: Bastien Curutchet (eBPF Foundation) <[email protected]>
Acked-by: Stanislav Fomichev <[email protected]>
ip6gre tunnels are tested in the test_tunnel.sh but not in the test_progs
framework.

Add a new test in test_progs to test ip6gre tunnels. It uses the same
network topology and the same BPF programs than the script. Disable the
IPv6 DAD feature because it can take lot of time and cause some tests 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) <[email protected]>
erspan tunnels are tested in the test_tunnel.sh but not in the test_progs
framework.

Add a new test in test_progs to test erspan tunnels. It uses the same
network topology and the same BPF programs than the script.
Remove test_erspan() from the script.

Signed-off-by: Bastien Curutchet (eBPF Foundation) <[email protected]>
Acked-by: Stanislav Fomichev <[email protected]>
ip6erspan tunnels are tested in the test_tunnel.sh but not in the
test_progs framework.

Add a new test in test_progs to test ip6erspan tunnels. It uses the same
network topology and the same BPF programs than the script.
Remove test_ip6erspan() from the script.

Signed-off-by: Bastien Curutchet (eBPF Foundation) <[email protected]>
Acked-by: Stanislav Fomichev <[email protected]>
geneve tunnels are tested in the test_tunnel.sh but not in the test_progs
framework.

Add a new test in test_progs to test geneve tunnels. It uses the same
network topology and the same BPF programs than the script.
Remove test_geneve() from the script.

Signed-off-by: Bastien Curutchet (eBPF Foundation) <[email protected]>
Acked-by: Stanislav Fomichev <[email protected]>
ip6geneve tunnels are tested in the test_tunnel.sh but not in the
test_progs framework.

Add a new test in test_progs to test ip6geneve tunnels. It uses the same
network topology and the same BPF programs than the script.
Remove test_ip6geneve() from the script.

Signed-off-by: Bastien Curutchet (eBPF Foundation) <[email protected]>
Acked-by: Stanislav Fomichev <[email protected]>
ip6tnl tunnels are tested in the test_tunnel.sh but not in the test_progs
framework.

Add a new test in test_progs to test ip6tnl tunnels. It uses the same
network topology and the same BPF programs than the script.
Remove test_ipip6() and test_ip6ip6() from the script.

Signed-off-by: Bastien Curutchet (eBPF Foundation) <[email protected]>
Acked-by: Stanislav Fomichev <[email protected]>
All tests from test_tunnel.sh have been migrated into test test_progs.
The last test remaining in the script is the test_ipip() that is already
covered in the test_prog framework by the NONE case of test_ipip_tunnel().

Remove the test_tunnel.sh script and its Makefile entry

Signed-off-by: Bastien Curutchet (eBPF Foundation) <[email protected]>
Acked-by: Stanislav Fomichev <[email protected]>
@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 0b93631
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=938523
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=938523 expired. Closing PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant