linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Rostecki <mrostecki@opensuse.org>
To: Quentin Monnet <quentin@isovalent.com>, bpf@vger.kernel.org
Cc: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>, Andrii Nakryiko <andriin@fb.com>,
	Quentin Monnet <quentin.monnet@netronome.com>,
	Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Shuah Khan <shuah@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	"open list:KERNEL SELFTEST FRAMEWORK" 
	<linux-kselftest@vger.kernel.org>
Subject: Re: [PATCH bpf-next v2 5/5] selftests/bpf: Add test for "bpftool feature" command
Date: Tue, 25 Feb 2020 14:25:31 +0100	[thread overview]
Message-ID: <dbdb9673-dbb4-45e6-918f-9d4cd69ccfef@opensuse.org> (raw)
In-Reply-To: <d178dc6c-7696-8e58-9df9-887152104a1c@isovalent.com>

On 2/21/20 12:28 PM, Quentin Monnet wrote:>> +    def
test_feature_macros(self):
>> +        expected_patterns = [
>> +            b"/\*\*\* System call availability \*\*\*/",
>> +            b"#define HAVE_BPF_SYSCALL",
>> +            b"/\*\*\* eBPF program types \*\*\*/",
>> +            b"#define HAVE.*PROG_TYPE",
>> +            b"/\*\*\* eBPF map types \*\*\*/",
>> +            b"#define HAVE.*MAP_TYPE",
>> +            b"/\*\*\* eBPF helper functions \*\*\*/",
>> +            b"#define HAVE.*HELPER",
>> +            b"/\*\*\* eBPF misc features \*\*\*/",
>> +        ]
>> +
>> +        res = bpftool(["feature", "probe", "macros"])
>> +        for pattern in expected_patterns:
>> +            self.assertRegex(res, pattern)
> 
> Could we have (or did I miss it?) a test that compares the output of
> probes _with_ "full" and _without_ it, to make sure that the only lines
> that differ are about "bpf_trace_prink" or "bpf_probe_write_user"? Could
> help determine if we filter out too many elements by mistake.
> 
> Thanks,
> Quentin

Good idea, I will add that test in v3.

  reply	other threads:[~2020-02-25 13:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-21  3:16 [PATCH bpf-next v2 0/5] bpftool: Make probes which emit dmesg warnings optional Michal Rostecki
2020-02-21  3:16 ` [PATCH bpf-next v2 1/5] bpftool: Move out sections to separate functions Michal Rostecki
2020-02-21 11:27   ` Quentin Monnet
2020-02-21  3:16 ` [PATCH bpf-next v2 2/5] bpftool: Make probes which emit dmesg warnings optional Michal Rostecki
2020-02-21 11:28   ` Quentin Monnet
2020-02-21 22:44     ` Alexei Starovoitov
2020-02-25 12:18       ` Michal Rostecki
2020-02-21  3:16 ` [PATCH bpf-next v2 3/5] bpftool: Update documentation of "bpftool feature" command Michal Rostecki
2020-02-21 11:28   ` Quentin Monnet
2020-02-21  3:16 ` [PATCH bpf-next v2 4/5] bpftool: Update bash completion for " Michal Rostecki
2020-02-21 11:29   ` Quentin Monnet
2020-02-21  3:17 ` [PATCH bpf-next v2 5/5] selftests/bpf: Add test " Michal Rostecki
2020-02-21 11:28   ` Quentin Monnet
2020-02-25 13:25     ` Michal Rostecki [this message]
2020-02-25 13:55     ` Michal Rostecki
2020-02-25 14:54       ` Quentin Monnet

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=dbdb9673-dbb4-45e6-918f-9d4cd69ccfef@opensuse.org \
    --to=mrostecki@opensuse.org \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=hawk@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=kafai@fb.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=quentin.monnet@netronome.com \
    --cc=quentin@isovalent.com \
    --cc=shuah@kernel.org \
    --cc=songliubraving@fb.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
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).