diff mbox series

[net] seg6: selftests/bpf: fix BPF object file name in test_lwt_seg6local.sh

Message ID 20221107143044.27763-1-andrea.mayer@uniroma2.it (mailing list archive)
State Handled Elsewhere
Delegated to: BPF
Headers show
Series [net] seg6: selftests/bpf: fix BPF object file name in test_lwt_seg6local.sh | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 16 of 16 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success net selftest script(s) already in Makefile
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch warning WARNING: line length of 110 exceeds 80 columns WARNING: line length of 135 exceeds 80 columns WARNING: line length of 137 exceeds 80 columns
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
bpf/vmtest-bpf-PR pending PR summary
bpf/vmtest-bpf-VM_Test-1 pending Logs for ShellCheck
bpf/vmtest-bpf-VM_Test-5 success Logs for llvm-toolchain
bpf/vmtest-bpf-VM_Test-6 success Logs for set-matrix
bpf/vmtest-bpf-VM_Test-2 success Logs for build for s390x with gcc
bpf/vmtest-bpf-VM_Test-3 success Logs for build for x86_64 with gcc
bpf/vmtest-bpf-VM_Test-4 success Logs for build for x86_64 with llvm-16
bpf/vmtest-bpf-VM_Test-7 pending Logs for test_maps on s390x with gcc
bpf/vmtest-bpf-VM_Test-8 pending Logs for test_maps on x86_64 with gcc
bpf/vmtest-bpf-VM_Test-9 pending Logs for test_maps on x86_64 with llvm-16
bpf/vmtest-bpf-VM_Test-10 pending Logs for test_progs on s390x with gcc
bpf/vmtest-bpf-VM_Test-11 pending Logs for test_progs on x86_64 with gcc
bpf/vmtest-bpf-VM_Test-12 pending Logs for test_progs on x86_64 with llvm-16
bpf/vmtest-bpf-VM_Test-13 pending Logs for test_progs_no_alu32 on s390x with gcc
bpf/vmtest-bpf-VM_Test-14 pending Logs for test_progs_no_alu32 on x86_64 with gcc
bpf/vmtest-bpf-VM_Test-15 pending Logs for test_progs_no_alu32 on x86_64 with llvm-16
bpf/vmtest-bpf-VM_Test-16 pending Logs for test_progs_no_alu32_parallel on s390x with gcc
bpf/vmtest-bpf-VM_Test-17 success Logs for test_progs_no_alu32_parallel on x86_64 with gcc
bpf/vmtest-bpf-VM_Test-18 success Logs for test_progs_no_alu32_parallel on x86_64 with llvm-16
bpf/vmtest-bpf-VM_Test-19 success Logs for test_progs_parallel on s390x with gcc
bpf/vmtest-bpf-VM_Test-20 success Logs for test_progs_parallel on x86_64 with gcc
bpf/vmtest-bpf-VM_Test-21 success Logs for test_progs_parallel on x86_64 with llvm-16
bpf/vmtest-bpf-VM_Test-22 success Logs for test_verifier on s390x with gcc
bpf/vmtest-bpf-VM_Test-23 success Logs for test_verifier on x86_64 with gcc
bpf/vmtest-bpf-VM_Test-24 success Logs for test_verifier on x86_64 with llvm-16

Commit Message

Andrea Mayer Nov. 7, 2022, 2:30 p.m. UTC
The test_lwt_seg6local.c implements several eBPF programs which are
used to test the SRv6 End.BPF behavior.
Since commit afef88e65554 ("selftests/bpf: Store BPF object files with
.bpf.o extension"), part of the build system and test programs loading
BPF object files are supposed to work with the .bpf.o extension.

Consequently, the test_lwt_seg6local.c is compiled into
test_lwt_seg6local.bpf.o and the corresponding test_lwt_seg6local.sh
script is not updated to deal with the correct .bpf.o extension.

This patch fixes the test_lwt_seg6local.sh, using the correct .bpf.o
extension for the testing BPF object file, i.e. test_lwt_seg6local.bpf.o.

Fixes: afef88e65554 ("selftests/bpf: Store BPF object files with .bpf.o extension")
Signed-off-by: Andrea Mayer <andrea.mayer@uniroma2.it>
---
 tools/testing/selftests/bpf/test_lwt_seg6local.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Daniel Müller Nov. 7, 2022, 5:42 p.m. UTC | #1
Hi Andrea,

On Mon, Nov 07, 2022 at 03:30:44PM +0100, Andrea Mayer wrote:
> The test_lwt_seg6local.c implements several eBPF programs which are
> used to test the SRv6 End.BPF behavior.
> Since commit afef88e65554 ("selftests/bpf: Store BPF object files with
> .bpf.o extension"), part of the build system and test programs loading
> BPF object files are supposed to work with the .bpf.o extension.
> 
> Consequently, the test_lwt_seg6local.c is compiled into
> test_lwt_seg6local.bpf.o and the corresponding test_lwt_seg6local.sh
> script is not updated to deal with the correct .bpf.o extension.
> 
> This patch fixes the test_lwt_seg6local.sh, using the correct .bpf.o
> extension for the testing BPF object file, i.e. test_lwt_seg6local.bpf.o.
> 
> Fixes: afef88e65554 ("selftests/bpf: Store BPF object files with .bpf.o extension")
> Signed-off-by: Andrea Mayer <andrea.mayer@uniroma2.it>
> ---
>  tools/testing/selftests/bpf/test_lwt_seg6local.sh | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/testing/selftests/bpf/test_lwt_seg6local.sh b/tools/testing/selftests/bpf/test_lwt_seg6local.sh
> index 826f4423ce02..bfe76ab78481 100755
> --- a/tools/testing/selftests/bpf/test_lwt_seg6local.sh
> +++ b/tools/testing/selftests/bpf/test_lwt_seg6local.sh
> @@ -117,18 +117,18 @@ ip netns exec ${NS6} ip -6 addr add fb00::109/16 dev veth10 scope link
>  ip netns exec ${NS1} ip -6 addr add fb00::1/16 dev lo
>  ip netns exec ${NS1} ip -6 route add fb00::6 dev veth1 via fb00::21
>  
> -ip netns exec ${NS2} ip -6 route add fb00::6 encap bpf in obj test_lwt_seg6local.o sec encap_srh dev veth2
> +ip netns exec ${NS2} ip -6 route add fb00::6 encap bpf in obj test_lwt_seg6local.bpf.o sec encap_srh dev veth2
>  ip netns exec ${NS2} ip -6 route add fd00::1 dev veth3 via fb00::43 scope link
>  
>  ip netns exec ${NS3} ip -6 route add fc42::1 dev veth5 via fb00::65
> -ip netns exec ${NS3} ip -6 route add fd00::1 encap seg6local action End.BPF endpoint obj test_lwt_seg6local.o sec add_egr_x dev veth4
> +ip netns exec ${NS3} ip -6 route add fd00::1 encap seg6local action End.BPF endpoint obj test_lwt_seg6local.bpf.o sec add_egr_x dev veth4
>  
> -ip netns exec ${NS4} ip -6 route add fd00::2 encap seg6local action End.BPF endpoint obj test_lwt_seg6local.o sec pop_egr dev veth6
> +ip netns exec ${NS4} ip -6 route add fd00::2 encap seg6local action End.BPF endpoint obj test_lwt_seg6local.bpf.o sec pop_egr dev veth6
>  ip netns exec ${NS4} ip -6 addr add fc42::1 dev lo
>  ip netns exec ${NS4} ip -6 route add fd00::3 dev veth7 via fb00::87
>  
>  ip netns exec ${NS5} ip -6 route add fd00::4 table 117 dev veth9 via fb00::109
> -ip netns exec ${NS5} ip -6 route add fd00::3 encap seg6local action End.BPF endpoint obj test_lwt_seg6local.o sec inspect_t dev veth8
> +ip netns exec ${NS5} ip -6 route add fd00::3 encap seg6local action End.BPF endpoint obj test_lwt_seg6local.bpf.o sec inspect_t dev veth8
>  
>  ip netns exec ${NS6} ip -6 addr add fb00::6/16 dev lo
>  ip netns exec ${NS6} ip -6 addr add fd00::4/16 dev lo

The change looks good to me. Thanks for the fix.

Daniel

Acked-by: Daniel Müller <deso@posteo.net>
Yonghong Song Nov. 7, 2022, 5:48 p.m. UTC | #2
On 11/7/22 6:30 AM, Andrea Mayer wrote:
> The test_lwt_seg6local.c implements several eBPF programs which are
> used to test the SRv6 End.BPF behavior.
> Since commit afef88e65554 ("selftests/bpf: Store BPF object files with
> .bpf.o extension"), part of the build system and test programs loading
> BPF object files are supposed to work with the .bpf.o extension.
> 
> Consequently, the test_lwt_seg6local.c is compiled into
> test_lwt_seg6local.bpf.o and the corresponding test_lwt_seg6local.sh
> script is not updated to deal with the correct .bpf.o extension.
> 
> This patch fixes the test_lwt_seg6local.sh, using the correct .bpf.o
> extension for the testing BPF object file, i.e. test_lwt_seg6local.bpf.o.
> 
> Fixes: afef88e65554 ("selftests/bpf: Store BPF object files with .bpf.o extension")
> Signed-off-by: Andrea Mayer <andrea.mayer@uniroma2.it>

Acked-by: Yonghong Song <yhs@fb.com>
Martin KaFai Lau Nov. 7, 2022, 6:08 p.m. UTC | #3
On 11/7/22 6:30 AM, Andrea Mayer wrote:
> The test_lwt_seg6local.c implements several eBPF programs which are
> used to test the SRv6 End.BPF behavior.
> Since commit afef88e65554 ("selftests/bpf: Store BPF object files with
> .bpf.o extension"), part of the build system and test programs loading
> BPF object files are supposed to work with the .bpf.o extension.
> 
> Consequently, the test_lwt_seg6local.c is compiled into
> test_lwt_seg6local.bpf.o and the corresponding test_lwt_seg6local.sh
> script is not updated to deal with the correct .bpf.o extension.
> 
> This patch fixes the test_lwt_seg6local.sh, using the correct .bpf.o
> extension for the testing BPF object file, i.e. test_lwt_seg6local.bpf.o.

This has already been fixed in
commit 98af3746026c ("selftests/bpf: fix missing BPF object files") in bpf-next.
diff mbox series

Patch

diff --git a/tools/testing/selftests/bpf/test_lwt_seg6local.sh b/tools/testing/selftests/bpf/test_lwt_seg6local.sh
index 826f4423ce02..bfe76ab78481 100755
--- a/tools/testing/selftests/bpf/test_lwt_seg6local.sh
+++ b/tools/testing/selftests/bpf/test_lwt_seg6local.sh
@@ -117,18 +117,18 @@  ip netns exec ${NS6} ip -6 addr add fb00::109/16 dev veth10 scope link
 ip netns exec ${NS1} ip -6 addr add fb00::1/16 dev lo
 ip netns exec ${NS1} ip -6 route add fb00::6 dev veth1 via fb00::21
 
-ip netns exec ${NS2} ip -6 route add fb00::6 encap bpf in obj test_lwt_seg6local.o sec encap_srh dev veth2
+ip netns exec ${NS2} ip -6 route add fb00::6 encap bpf in obj test_lwt_seg6local.bpf.o sec encap_srh dev veth2
 ip netns exec ${NS2} ip -6 route add fd00::1 dev veth3 via fb00::43 scope link
 
 ip netns exec ${NS3} ip -6 route add fc42::1 dev veth5 via fb00::65
-ip netns exec ${NS3} ip -6 route add fd00::1 encap seg6local action End.BPF endpoint obj test_lwt_seg6local.o sec add_egr_x dev veth4
+ip netns exec ${NS3} ip -6 route add fd00::1 encap seg6local action End.BPF endpoint obj test_lwt_seg6local.bpf.o sec add_egr_x dev veth4
 
-ip netns exec ${NS4} ip -6 route add fd00::2 encap seg6local action End.BPF endpoint obj test_lwt_seg6local.o sec pop_egr dev veth6
+ip netns exec ${NS4} ip -6 route add fd00::2 encap seg6local action End.BPF endpoint obj test_lwt_seg6local.bpf.o sec pop_egr dev veth6
 ip netns exec ${NS4} ip -6 addr add fc42::1 dev lo
 ip netns exec ${NS4} ip -6 route add fd00::3 dev veth7 via fb00::87
 
 ip netns exec ${NS5} ip -6 route add fd00::4 table 117 dev veth9 via fb00::109
-ip netns exec ${NS5} ip -6 route add fd00::3 encap seg6local action End.BPF endpoint obj test_lwt_seg6local.o sec inspect_t dev veth8
+ip netns exec ${NS5} ip -6 route add fd00::3 encap seg6local action End.BPF endpoint obj test_lwt_seg6local.bpf.o sec inspect_t dev veth8
 
 ip netns exec ${NS6} ip -6 addr add fb00::6/16 dev lo
 ip netns exec ${NS6} ip -6 addr add fd00::4/16 dev lo