diff options
author | Joe Stringer <joe@wand.net.nz> | 2018-02-14 13:50:34 -0800 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-02-15 10:22:55 +0100 |
commit | 95f87a9706d0a55ff02a652bc8f1b3f7d51bf5eb (patch) | |
tree | 08ad076140193e398291e6e74f0b75aa1ac7e6cf /tools | |
parent | 615a9474985799c8b48645b8e95a9b9f0691f56a (diff) | |
download | linux-95f87a9706d0a55ff02a652bc8f1b3f7d51bf5eb.tar.gz linux-95f87a9706d0a55ff02a652bc8f1b3f7d51bf5eb.tar.bz2 linux-95f87a9706d0a55ff02a652bc8f1b3f7d51bf5eb.zip |
selftests/bpf: Print unexpected output on fail
This makes it easier to debug off-hand when the error message isn't
exactly as expected.
Signed-off-by: Joe Stringer <joe@wand.net.nz>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/bpf/test_verifier.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/test_verifier.c b/tools/testing/selftests/bpf/test_verifier.c index c0f16e93f9bd..6cf9bd6f08b7 100644 --- a/tools/testing/selftests/bpf/test_verifier.c +++ b/tools/testing/selftests/bpf/test_verifier.c @@ -11291,7 +11291,8 @@ static void do_test_single(struct bpf_test *test, bool unpriv, goto fail_log; } if (!strstr(bpf_vlog, expected_err) && !reject_from_alignment) { - printf("FAIL\nUnexpected error message!\n"); + printf("FAIL\nUnexpected error message!\n\tEXP: %s\n\tRES: %s\n", + expected_err, bpf_vlog); goto fail_log; } } |