Skip to contentSkip to conversation

selftests/bpf: remove useless bpf_trace_printk

PATCH Applied Alexei Starovoitov 2 participants 2 messages Oct 29, 2017 – Nov 1, 2017

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests/bpf: remove useless bpf_trace_printk

sockmap test is using two programs that use bpf_trace_printk() which prints into trace_pipe, but nothing is reading it. Remove it.

Fixes 6f6d33f3b3d0 ("bpf: selftests add sockmap tests")
---
 tools/testing/selftests/bpf/sockmap_parse_prog.c   | 3 ---
 tools/testing/selftests/bpf/sockmap_verdict_prog.c | 2 --
 2 files changed, 5 deletions(-)
tools/testing/selftests/bpf/sockmap_parse_prog.c +0 -3
index fae3b96c3aa4..a1dec2b6d9c5 100644
@@ -29,9 +29,6 @@ int bpf_prog1(struct __sk_buff *skb)
 	 * fields.
 	 */
 	d[7] = 1;
-
-	bpf_printk("parse: data[0] = (%u): local_port %i remote %i\n",
-		   d[0], lport, bpf_ntohl(rport));
 	return skb->len;
 }
 
tools/testing/selftests/bpf/sockmap_verdict_prog.c +0 -2
index 2cd2d552938b..d7bea972cb21 100644
@@ -58,8 +58,6 @@ int bpf_prog2(struct __sk_buff *skb)
 	d[6] = 0xe;
 	d[7] = 0xf;
 
-	bpf_printk("verdict: data[0] = redir(%u:%u)\n", map, sk);
-
 	if (!map)
 		return bpf_sk_redirect_map(skb, &sock_map_rx, sk, 0);
 	return bpf_sk_redirect_map(skb, &sock_map_tx, sk, 0);
Signature · 1 line
2.9.5
maintainer Applied
#1 lore raw

From: Alexei Starovoitov <[email protected]>
Date: Sat, 28 Oct 2017 17:17:13 -0700

Quoted 6 lines

sockmap test is using two programs that use bpf_trace_printk() which prints into trace_pipe, but nothing is reading it. Remove it.

Fixes 6f6d33f3b3d0 ("bpf: selftests add sockmap tests")

Applied, thanks.