diff mbox series

[v2] sample: bpf: syscall_tp_user: print result of verify_map

Message ID 1648889828-12417-1-git-send-email-chensong_2000@189.cn (mailing list archive)
State Accepted
Commit 35f91d1fe106cd474ac0463157d012c675385e18
Delegated to: BPF
Headers show
Series [v2] sample: bpf: syscall_tp_user: print result of verify_map | expand

Checks

Context Check Description
bpf/vmtest-bpf-next-PR success PR summary
netdev/tree_selection success Not a local patch

Commit Message

Song Chen April 2, 2022, 8:57 a.m. UTC
At the end of the test, we already print out
    prog <prog number>: map ids <...> <...>
Value is the number read from kernel through bpf map, further print out
    verify map:<map id> val:<...>
will help users to understand the program runs successfully.

Signed-off-by: Song Chen <chensong_2000@189.cn>
---
 samples/bpf/syscall_tp_user.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

patchwork-bot+netdevbpf@kernel.org April 4, 2022, 9:50 p.m. UTC | #1
Hello:

This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:

On Sat,  2 Apr 2022 16:57:08 +0800 you wrote:
> At the end of the test, we already print out
>     prog <prog number>: map ids <...> <...>
> Value is the number read from kernel through bpf map, further print out
>     verify map:<map id> val:<...>
> will help users to understand the program runs successfully.
> 
> Signed-off-by: Song Chen <chensong_2000@189.cn>
> 
> [...]

Here is the summary with links:
  - [v2] sample: bpf: syscall_tp_user: print result of verify_map
    https://git.kernel.org/bpf/bpf-next/c/35f91d1fe106

You are awesome, thank you!
diff mbox series

Patch

diff --git a/samples/bpf/syscall_tp_user.c b/samples/bpf/syscall_tp_user.c
index a0ebf1833ed3..c55383068384 100644
--- a/samples/bpf/syscall_tp_user.c
+++ b/samples/bpf/syscall_tp_user.c
@@ -36,6 +36,9 @@  static void verify_map(int map_id)
 		fprintf(stderr, "failed: map #%d returns value 0\n", map_id);
 		return;
 	}
+
+	printf("verify map:%d val: %d\n", map_id, val);
+
 	val = 0;
 	if (bpf_map_update_elem(map_id, &key, &val, BPF_ANY) != 0) {
 		fprintf(stderr, "map_update failed: %s\n", strerror(errno));