aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/test_align.c
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2017-07-21 00:00:22 +0200
committerDavid S. Miller <davem@davemloft.net>2017-07-20 15:20:27 -0700
commitd655490417ee22da3267fe6592a0ec2023c3c0db (patch)
treed6a46018c9e1e644757d89b763e09a4472254d16 /tools/testing/selftests/bpf/test_align.c
parentbpf: fix mixed signed/unsigned derived min/max value bounds (diff)
downloadlinux-dev-d655490417ee22da3267fe6592a0ec2023c3c0db.tar.xz
linux-dev-d655490417ee22da3267fe6592a0ec2023c3c0db.zip
bpf: allow to specify log level and reduce it for test_verifier
For the test_verifier case, it's quite hard to parse log level 2 to figure out what's causing an issue when used to log level 1. We do want to use bpf_verify_program() in order to simulate some of the tests with strict alignment. So just add an argument to pass the level and put it to 1 for test_verifier. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/bpf/test_align.c')
-rw-r--r--tools/testing/selftests/bpf/test_align.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/test_align.c b/tools/testing/selftests/bpf/test_align.c
index bccebd935907..29793694cbc7 100644
--- a/tools/testing/selftests/bpf/test_align.c
+++ b/tools/testing/selftests/bpf/test_align.c
@@ -380,7 +380,7 @@ static int do_test_single(struct bpf_align_test *test)
prog_len = probe_filter_length(prog);
fd_prog = bpf_verify_program(prog_type ? : BPF_PROG_TYPE_SOCKET_FILTER,
prog, prog_len, 1, "GPL", 0,
- bpf_vlog, sizeof(bpf_vlog));
+ bpf_vlog, sizeof(bpf_vlog), 2);
if (fd_prog < 0) {
printf("Failed to load program.\n");
printf("%s", bpf_vlog);