All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Stanislav Fomichev <sdf@google.com>
Cc: Network Development <netdev@vger.kernel.org>,
	bpf <bpf@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>
Subject: Re: [PATCH bpf-next] selftests/bpf: fix a couple of broken test_btf cases
Date: Fri, 24 Apr 2020 17:48:23 -0700	[thread overview]
Message-ID: <CAADnVQL+p1XmSsUe1UZ99PbBy7x-w8rqND-5HzZ5MENZtNAEvA@mail.gmail.com> (raw)
In-Reply-To: <20200422003753.124921-1-sdf@google.com>

On Tue, Apr 21, 2020 at 5:37 PM Stanislav Fomichev <sdf@google.com> wrote:
>
> Commit 51c39bb1d5d1 ("bpf: Introduce function-by-function verification")
> introduced function linkage flag and changed the error message from
> "vlen != 0" to "Invalid func linkage" and broke some fake BPF programs.
>
> Adjust the test accordingly.
>
> AFACT, the programs don't really need any arguments and only look
> at BTF for maps, so let's drop the args altogether.
>
> Before:
> BTF raw test[103] (func (Non zero vlen)): do_test_raw:3703:FAIL expected
> err_str:vlen != 0
> magic: 0xeb9f
> version: 1
> flags: 0x0
> hdr_len: 24
> type_off: 0
> type_len: 72
> str_off: 72
> str_len: 10
> btf_total_size: 106
> [1] INT (anon) size=4 bits_offset=0 nr_bits=32 encoding=SIGNED
> [2] INT (anon) size=4 bits_offset=0 nr_bits=32 encoding=(none)
> [3] FUNC_PROTO (anon) return=0 args=(1 a, 2 b)
> [4] FUNC func type_id=3 Invalid func linkage
>
> BTF libbpf test[1] (test_btf_haskv.o): libbpf: load bpf program failed:
> Invalid argument
> libbpf: -- BEGIN DUMP LOG ---
> libbpf:
> Validating test_long_fname_2() func#1...
> Arg#0 type PTR in test_long_fname_2() is not supported yet.
> processed 0 insns (limit 1000000) max_states_per_insn 0 total_states 0
> peak_states 0 mark_read 0
>
> libbpf: -- END LOG --
> libbpf: failed to load program 'dummy_tracepoint'
> libbpf: failed to load object 'test_btf_haskv.o'
> do_test_file:4201:FAIL bpf_object__load: -4007
> BTF libbpf test[2] (test_btf_newkv.o): libbpf: load bpf program failed:
> Invalid argument
> libbpf: -- BEGIN DUMP LOG ---
> libbpf:
> Validating test_long_fname_2() func#1...
> Arg#0 type PTR in test_long_fname_2() is not supported yet.
> processed 0 insns (limit 1000000) max_states_per_insn 0 total_states 0
> peak_states 0 mark_read 0
>
> libbpf: -- END LOG --
> libbpf: failed to load program 'dummy_tracepoint'
> libbpf: failed to load object 'test_btf_newkv.o'
> do_test_file:4201:FAIL bpf_object__load: -4007
> BTF libbpf test[3] (test_btf_nokv.o): libbpf: load bpf program failed:
> Invalid argument
> libbpf: -- BEGIN DUMP LOG ---
> libbpf:
> Validating test_long_fname_2() func#1...
> Arg#0 type PTR in test_long_fname_2() is not supported yet.
> processed 0 insns (limit 1000000) max_states_per_insn 0 total_states 0
> peak_states 0 mark_read 0
>
> libbpf: -- END LOG --
> libbpf: failed to load program 'dummy_tracepoint'
> libbpf: failed to load object 'test_btf_nokv.o'
> do_test_file:4201:FAIL bpf_object__load: -4007
>
> Fixes: 51c39bb1d5d1 ("bpf: Introduce function-by-function verification")
> Signed-off-by: Stanislav Fomichev <sdf@google.com>

Applied to bpf tree. Thanks

      reply	other threads:[~2020-04-25  0:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-22  0:37 [PATCH bpf-next] selftests/bpf: fix a couple of broken test_btf cases Stanislav Fomichev
2020-04-25  0:48 ` Alexei Starovoitov [this message]

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=CAADnVQL+p1XmSsUe1UZ99PbBy7x-w8rqND-5HzZ5MENZtNAEvA@mail.gmail.com \
    --to=alexei.starovoitov@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=sdf@google.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.