Thread (5 messages) 5 messages, 3 authors, 2021-03-26
STALE1923d

[bpf PATCH] bpf, selftests: test_maps generating unrecognized data section

From: John Fastabend <john.fastabend@gmail.com>
Date: 2021-03-24 21:08:53
Also in: bpf
Subsystem: bpf [general] (safe dynamic programs and tools), bpf [selftests] (test runners & infrastructure), kernel selftest framework, the rest · Maintainers: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, Eduard Zingerman, Kumar Kartikeya Dwivedi, Shuah Khan, Linus Torvalds

With a relatively recent clang master branch test_map skips a section,

 libbpf: elf: skipping unrecognized data section(5) .rodata.str1.1

the cause is some pointless strings from bpf_printks in the BPF program
loaded during testing. Remove them so we stop tripping our test bots.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
---
 .../selftests/bpf/progs/sockmap_tcp_msg_prog.c     |    3 ---
 1 file changed, 3 deletions(-)
diff --git a/tools/testing/selftests/bpf/progs/sockmap_tcp_msg_prog.c b/tools/testing/selftests/bpf/progs/sockmap_tcp_msg_prog.c
index fdb4bf4408fa..0f603253f4ed 100644
--- a/tools/testing/selftests/bpf/progs/sockmap_tcp_msg_prog.c
+++ b/tools/testing/selftests/bpf/progs/sockmap_tcp_msg_prog.c
@@ -16,10 +16,7 @@ int bpf_prog1(struct sk_msg_md *msg)
 	if (data + 8 > data_end)
 		return SK_DROP;
 
-	bpf_printk("data length %i\n", (__u64)msg->data_end - (__u64)msg->data);
 	d = (char *)data;
-	bpf_printk("hello sendmsg hook %i %i\n", d[0], d[1]);
-
 	return SK_PASS;
 }
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help