bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andrii.nakryiko@gmail.com>
To: John Fastabend <john.fastabend@gmail.com>
Cc: Andrii Nakryiko <andrii@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>,
	Alexei Starovoitov <ast@fb.com>
Subject: Re: [bpf PATCH] bpf, selftests: test_maps generating unrecognized data section
Date: Thu, 25 Mar 2021 20:03:28 -0700	[thread overview]
Message-ID: <CAEf4BzZr8fZjxyki4CauU3qZ-Xac_B7jJ4STaJPwTZhYSqN1AQ@mail.gmail.com> (raw)
In-Reply-To: <161662006586.29133.187705917710998342.stgit@john-Precision-5820-Tower>

On Wed, Mar 24, 2021 at 2:07 PM John Fastabend <john.fastabend@gmail.com> wrote:
>
> With a relatively recent clang master branch test_map skips a section,
>
>  libbpf: elf: skipping unrecognized data section(5) .rodata.str1.1
>

So it was on my TODO list for a while to get rid of this by combining
all .rodata* sections into one at load time. I even outline that in
"libbpf v1.0" doc ([0]). I just haven't gotten to implementing this
yet. You can safely ignore this for now. But I also have nothing
against cleaning up tests, of course.

  [0] https://docs.google.com/document/d/1UyjTZuPFWiPFyKk1tV5an11_iaRuec6U-ZESZ54nNTY


> the cause is some pointless strings from bpf_printks in the BPF program
> loaded during testing. Remove them so we stop tripping our test bots.
>
> Signed-off-by: John Fastabend <john.fastabend@gmail.com>
> ---
>  .../selftests/bpf/progs/sockmap_tcp_msg_prog.c     |    3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/tools/testing/selftests/bpf/progs/sockmap_tcp_msg_prog.c b/tools/testing/selftests/bpf/progs/sockmap_tcp_msg_prog.c
> index fdb4bf4408fa..0f603253f4ed 100644
> --- a/tools/testing/selftests/bpf/progs/sockmap_tcp_msg_prog.c
> +++ b/tools/testing/selftests/bpf/progs/sockmap_tcp_msg_prog.c
> @@ -16,10 +16,7 @@ int bpf_prog1(struct sk_msg_md *msg)
>         if (data + 8 > data_end)
>                 return SK_DROP;
>
> -       bpf_printk("data length %i\n", (__u64)msg->data_end - (__u64)msg->data);
>         d = (char *)data;
> -       bpf_printk("hello sendmsg hook %i %i\n", d[0], d[1]);
> -
>         return SK_PASS;
>  }
>
>

      parent reply	other threads:[~2021-03-26  3:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-24 21:07 [bpf PATCH] small test_maps fix John Fastabend
2021-03-24 21:07 ` [bpf PATCH] bpf, selftests: test_maps generating unrecognized data section John Fastabend
2021-03-25 21:07   ` Daniel Borkmann
2021-03-26  0:35     ` John Fastabend
2021-03-26  3:03   ` Andrii Nakryiko [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=CAEf4BzZr8fZjxyki4CauU3qZ-Xac_B7jJ4STaJPwTZhYSqN1AQ@mail.gmail.com \
    --to=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@fb.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=john.fastabend@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).