public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 2/4] bpf: Print full verification log
Date: Tue, 31 Aug 2021 11:51:04 +0200	[thread overview]
Message-ID: <YS37iPx2tWsy0FF5@yuki> (raw)
In-Reply-To: <20210831091005.25361-2-rpalethorpe@suse.com>

Hi!
> diff --git a/testcases/kernel/syscalls/bpf/bpf_common.c b/testcases/kernel/syscalls/bpf/bpf_common.c
> index ba0829a75..aac235cac 100644
> --- a/testcases/kernel/syscalls/bpf/bpf_common.c
> +++ b/testcases/kernel/syscalls/bpf/bpf_common.c
> @@ -3,6 +3,8 @@
>   * Copyright (c) 2019-2020 Linux Test Project
>   */
>  
> +#include <stdio.h>

I've removed this now unused include.

>  #define TST_NO_DEFAULT_MAIN
>  #include "tst_test.h"
>  #include "bpf_common.h"
> @@ -118,8 +120,10 @@ int bpf_load_prog(union bpf_attr *const attr, const char *const log)
>  	if (ret != -1)
>  		tst_brk(TBROK, "Invalid bpf() return value: %d", ret);
>  
> -	if (log[0] != 0)
> -		tst_brk(TBROK | TERRNO, "Failed verification: %s", log);
> +	if (log[0] != 0) {
> +		tst_printf("%s\n", log);
> +		tst_brk(TBROK | TERRNO, "Failed verification");
> +	}
>  
>  	tst_brk(TBROK | TERRNO, "Failed to load program");
>  	return ret;

And pushed the whole patchset, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2021-08-31  9:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-27  5:13 [LTP] [PATCH 1/3] bpf: Print full verification log Richard Palethorpe
2021-08-27  5:13 ` [LTP] [PATCH 2/3] bpf: Mention CAP_BPF in required privs and add fallback definition Richard Palethorpe
2021-08-27  5:13 ` [LTP] [PATCH 3/3] bpf_prog05: Drop CAP_BPF and check if ptr arithmetic is allowed Richard Palethorpe
2021-08-30 15:23 ` [LTP] [PATCH 1/3] bpf: Print full verification log Cyril Hrubis
2021-08-31  9:10   ` [LTP] [PATCH v2 1/4] API: Add tst_printf to avoid specifying the output FD in tests Richard Palethorpe
2021-08-31  9:10     ` [LTP] [PATCH v2 2/4] bpf: Print full verification log Richard Palethorpe
2021-08-31  9:51       ` Cyril Hrubis [this message]
2021-08-31  9:10     ` [LTP] [PATCH v2 3/4] bpf: Mention CAP_BPF in required privs and add fallback definition Richard Palethorpe
2021-08-31  9:10     ` [LTP] [PATCH v2 4/4] bpf_prog05: Drop CAP_BPF and check if ptr arithmetic is allowed Richard Palethorpe
2022-01-11 10:42       ` Joerg Vehlow
2022-01-11 14:36         ` Richard Palethorpe
2022-01-12  6:55           ` Joerg Vehlow
2022-01-13  7:48             ` Richard Palethorpe
2022-01-14  6:51               ` Joerg Vehlow
2022-01-17 15:11                 ` Richard Palethorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YS37iPx2tWsy0FF5@yuki \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox