linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net] seg6: selftests/bpf: fix BPF object file name in test_lwt_seg6local.sh
@ 2022-11-07 14:30 Andrea Mayer
  2022-11-07 17:42 ` Daniel Müller
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andrea Mayer @ 2022-11-07 14:30 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
	KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa, Mykola Lysenko,
	Shuah Khan, Daniel Müller, bpf, linux-kselftest,
	linux-kernel
  Cc: Stefano Salsano, Paolo Lungaroni, Ahmed Abdelsalam, Andrea Mayer

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
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [net] seg6: selftests/bpf: fix BPF object file name in test_lwt_seg6local.sh
  2022-11-07 14:30 [net] seg6: selftests/bpf: fix BPF object file name in test_lwt_seg6local.sh Andrea Mayer
@ 2022-11-07 17:42 ` Daniel Müller
  2022-11-07 17:48 ` Yonghong Song
  2022-11-07 18:08 ` Martin KaFai Lau
  2 siblings, 0 replies; 4+ messages in thread
From: Daniel Müller @ 2022-11-07 17:42 UTC (permalink / raw)
  To: Andrea Mayer
  Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
	KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa, Mykola Lysenko,
	Shuah Khan, bpf, linux-kselftest, linux-kernel, Stefano Salsano,
	Paolo Lungaroni, Ahmed Abdelsalam

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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [net] seg6: selftests/bpf: fix BPF object file name in test_lwt_seg6local.sh
  2022-11-07 14:30 [net] seg6: selftests/bpf: fix BPF object file name in test_lwt_seg6local.sh Andrea Mayer
  2022-11-07 17:42 ` Daniel Müller
@ 2022-11-07 17:48 ` Yonghong Song
  2022-11-07 18:08 ` Martin KaFai Lau
  2 siblings, 0 replies; 4+ messages in thread
From: Yonghong Song @ 2022-11-07 17:48 UTC (permalink / raw)
  To: Andrea Mayer, Alexei Starovoitov, Daniel Borkmann,
	Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
	John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
	Mykola Lysenko, Shuah Khan, Daniel Müller, bpf,
	linux-kselftest, linux-kernel
  Cc: Stefano Salsano, Paolo Lungaroni, Ahmed Abdelsalam



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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [net] seg6: selftests/bpf: fix BPF object file name in test_lwt_seg6local.sh
  2022-11-07 14:30 [net] seg6: selftests/bpf: fix BPF object file name in test_lwt_seg6local.sh Andrea Mayer
  2022-11-07 17:42 ` Daniel Müller
  2022-11-07 17:48 ` Yonghong Song
@ 2022-11-07 18:08 ` Martin KaFai Lau
  2 siblings, 0 replies; 4+ messages in thread
From: Martin KaFai Lau @ 2022-11-07 18:08 UTC (permalink / raw)
  To: Andrea Mayer
  Cc: Stefano Salsano, Paolo Lungaroni, Ahmed Abdelsalam,
	Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, Song Liu,
	Yonghong Song, John Fastabend, KP Singh, Stanislav Fomichev,
	Hao Luo, Jiri Olsa, Mykola Lysenko, Shuah Khan,
	Daniel Müller, linux-kselftest, linux-kernel, bpf

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-11-07 18:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-07 14:30 [net] seg6: selftests/bpf: fix BPF object file name in test_lwt_seg6local.sh Andrea Mayer
2022-11-07 17:42 ` Daniel Müller
2022-11-07 17:48 ` Yonghong Song
2022-11-07 18:08 ` Martin KaFai Lau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).