diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2017-07-21 00:00:22 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-07-21 00:20:27 +0200 |
commit | d655490417ee22da3267fe6592a0ec2023c3c0db (patch) | |
tree | d6a46018c9e1e644757d89b763e09a4472254d16 /tools/testing/selftests/bpf/test_verifier.c | |
parent | bpf: fix mixed signed/unsigned derived min/max value bounds (diff) | |
download | linux-d655490417ee22da3267fe6592a0ec2023c3c0db.tar.xz linux-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 '')
-rw-r--r-- | tools/testing/selftests/bpf/test_verifier.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/test_verifier.c b/tools/testing/selftests/bpf/test_verifier.c index 404aec520812..f4d0a1de3925 100644 --- a/tools/testing/selftests/bpf/test_verifier.c +++ b/tools/testing/selftests/bpf/test_verifier.c @@ -5633,7 +5633,7 @@ static void do_test_single(struct bpf_test *test, bool unpriv, fd_prog = bpf_verify_program(prog_type ? : BPF_PROG_TYPE_SOCKET_FILTER, prog, prog_len, test->flags & F_LOAD_WITH_STRICT_ALIGNMENT, - "GPL", 0, bpf_vlog, sizeof(bpf_vlog)); + "GPL", 0, bpf_vlog, sizeof(bpf_vlog), 1); expected_ret = unpriv && test->result_unpriv != UNDEF ? test->result_unpriv : test->result; |