BPF Archive on lore.kernel.org
 help / color / Atom feed
From: Ilya Leoshkevich <iii@linux.ibm.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>, Yonghong Song <yhs@fb.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	John Fastabend <john.fastabend@gmail.com>,
	bpf <bpf@vger.kernel.org>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>
Subject: Re: [PATCH v4 bpf-next 6/7] selftest/bpf: Add BTF_KIND_FLOAT tests
Date: Tue, 23 Feb 2021 21:16:06 +0100
Message-ID: <df9bb41ed2065ff3b44bc85c4eb2e23d8e24fc88.camel@linux.ibm.com> (raw)
In-Reply-To: <CAEf4BzY+f77raXGrJN3Nz2To2EC0Td9zwaO2bYKS+W-ZftY9-Q@mail.gmail.com>

On Mon, 2021-02-22 at 23:11 -0800, Andrii Nakryiko wrote:
> On Mon, Feb 22, 2021 at 1:52 PM Ilya Leoshkevich <iii@linux.ibm.com>
> wrote:
> > 
> > Test the good variants as well as the potential malformed ones.
> > 
> > Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
> > Acked-by: Yonghong Song <yhs@fb.com>
> > ---
> 
> Would be nice to have BTF dumping and dedup tests added/adjusted as
> well.
> 
> >  tools/testing/selftests/bpf/btf_helpers.c    |   4 +
> >  tools/testing/selftests/bpf/prog_tests/btf.c | 129
> > +++++++++++++++++++
> >  tools/testing/selftests/bpf/test_btf.h       |   3 +
> >  3 files changed, 136 insertions(+)
> > 
> 
> [...]

I will add a dedup in the next series, but dumping test requires LLVM
support, so it will have to come later separately. Still, in my local
setup the following works:

--- a/tools/testing/selftests/bpf/progs/btf_dump_test_case_syntax.c
+++ b/tools/testing/selftests/bpf/progs/btf_dump_test_case_syntax.c
@@ -205,6 +205,12 @@ struct struct_with_embedded_stuff {
        int t[11];
 };
 
+struct float_struct {
+       float *f;
+       const double *d;
+       volatile long double *ld;
+};
+
 struct root_struct {
        enum e1 _1;
        enum e2 _2;
@@ -219,6 +225,7 @@ struct root_struct {
        union_fwd_t *_12;
        union_fwd_ptr_t _13;
        struct struct_with_embedded_stuff _14;
+       struct float_struct _15;
 };
 
 /* ------ END-EXPECTED-OUTPUT ------ */



  reply index

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-22 21:49 [PATCH v4 bpf-next 0/7] Add BTF_KIND_FLOAT support Ilya Leoshkevich
2021-02-22 21:49 ` [PATCH v4 bpf-next 1/7] bpf: Add BTF_KIND_FLOAT to uapi Ilya Leoshkevich
2021-02-22 21:49 ` [PATCH v4 bpf-next 2/7] libbpf: Add BTF_KIND_FLOAT support Ilya Leoshkevich
2021-02-23  7:03   ` Andrii Nakryiko
2021-02-23  7:08     ` Andrii Nakryiko
2021-02-23 20:14     ` Ilya Leoshkevich
2021-02-22 21:49 ` [PATCH v4 bpf-next 3/7] tools/bpftool: " Ilya Leoshkevich
2021-02-22 21:49 ` [PATCH v4 bpf-next 4/7] selftests/bpf: Use 25th bit in "invalid BTF_INFO" test Ilya Leoshkevich
2021-02-22 21:49 ` [PATCH v4 bpf-next 5/7] bpf: Add BTF_KIND_FLOAT support Ilya Leoshkevich
2021-02-22 21:49 ` [PATCH v4 bpf-next 6/7] selftest/bpf: Add BTF_KIND_FLOAT tests Ilya Leoshkevich
2021-02-23  7:11   ` Andrii Nakryiko
2021-02-23 20:16     ` Ilya Leoshkevich [this message]
2021-02-23 21:35       ` Andrii Nakryiko
2021-02-22 21:49 ` [PATCH v4 bpf-next 7/7] bpf: Document BTF_KIND_FLOAT in btf.rst Ilya Leoshkevich

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=df9bb41ed2065ff3b44bc85c4eb2e23d8e24fc88.camel@linux.ibm.com \
    --to=iii@linux.ibm.com \
    --cc=acme@redhat.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=gor@linux.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=john.fastabend@gmail.com \
    --cc=yhs@fb.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

BPF Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/bpf/0 bpf/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 bpf bpf/ https://lore.kernel.org/bpf \
		bpf@vger.kernel.org
	public-inbox-index bpf

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.bpf


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git