bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexei Starovoitov <ast@fb.com>
To: Andrii Nakryiko <andriin@fb.com>,
	"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"daniel@iogearbox.net" <daniel@iogearbox.net>
Cc: "andrii.nakryiko@gmail.com" <andrii.nakryiko@gmail.com>,
	Kernel Team <Kernel-team@fb.com>
Subject: Re: [PATCH bpf-next 5/6] selftests/bpf: replace test_progs and test_maps w/ general rule
Date: Tue, 15 Oct 2019 23:41:19 +0000	[thread overview]
Message-ID: <ca129d11-f243-8e46-38df-df0a52cb9c97@fb.com> (raw)
In-Reply-To: <20191015220352.435884-6-andriin@fb.com>

On 10/15/19 3:03 PM, Andrii Nakryiko wrote:
> Define test runner generation meta-rule that codifies dependencies
> between test runner, its tests, and its dependent BPF programs. Use that
> for defining test_progs and test_maps test-runners. Also additionally define
> 3 flavors of test_progs:
> - alu32, which builds BPF programs with 32-bit registers codegen;
> - bpf_gcc, which build BPF programs using GCC, if it supports BPF target;
> - native, which uses a mix of native Clang target and BPF target for LLC.

Great improvement, but it's taking it too far.
(clang  -I. -I/data/users/ast/net-next/tools/testing/selftests/bpf -g 
-D__TARGET_ARCH_x86 -I. -I./include/uapi 
-I/data/users/ast/net-next/tools/include/uapi 
-I/data/users/ast/net-next/tools/lib/bpf 
-I/data/users/ast/net-next/tools/testing/selftests/usr/include 
-idirafter /usr/local/include -idirafter 
/data/users/ast/llvm/bld/lib/clang/10.0.0/include -idirafter 
/usr/include -Wno-compare-distinct-pointer-types -O2 -emit-llvm -c 
progs/test_core_reloc_existence.c -o - || echo "BPF obj compilation 
failed") | llc -march=bpf -mcpu=probe   -filetype=obj -o 
/data/users/ast/net-next/tools/testing/selftests/bpf/native/test_core_reloc_existence.o
progs/test_core_reloc_existence.c:47:18: error: use of unknown builtin 
'__builtin_preserve_field_info' [-Wimplicit-function-declaration]
         out->a_exists = bpf_core_field_exists(in->a);

native clang + llc is useful for old school tracing only (before CO-RE).

  reply	other threads:[~2019-10-15 23:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-15 22:03 [PATCH bpf-next 0/6] Fix, clean up, and revamp selftests/bpf Makefile Andrii Nakryiko
2019-10-15 22:03 ` [PATCH bpf-next 1/6] selftest/bpf: teach test_progs to cd into subdir Andrii Nakryiko
2019-10-15 22:03 ` [PATCH bpf-next 2/6] selftests/bpf: make CO-RE reloc test impartial to test_progs flavor Andrii Nakryiko
2019-10-15 22:03 ` [PATCH bpf-next 3/6] selftests/bpf: switch test_maps to test_progs' test.h format Andrii Nakryiko
2019-10-15 22:03 ` [PATCH bpf-next 4/6] selftests/bpf: add simple per-test targets to Makefile Andrii Nakryiko
2019-10-15 22:03 ` [PATCH bpf-next 5/6] selftests/bpf: replace test_progs and test_maps w/ general rule Andrii Nakryiko
2019-10-15 23:41   ` Alexei Starovoitov [this message]
2019-10-15 23:50     ` Andrii Nakryiko
2019-10-16  3:34       ` Andrii Nakryiko
2019-10-15 22:03 ` [PATCH bpf-next 6/6] selftests/bpf: move test_queue_stack_map.h into progs/ where it belongs Andrii Nakryiko

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=ca129d11-f243-8e46-38df-df0a52cb9c97@fb.com \
    --to=ast@fb.com \
    --cc=Kernel-team@fb.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andriin@fb.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --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).