[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dbdb9673-dbb4-45e6-918f-9d4cd69ccfef@opensuse.org>
Date: Tue, 25 Feb 2020 14:25:31 +0100
From: Michal Rostecki <mrostecki@...nsuse.org>
To: Quentin Monnet <quentin@...valent.com>, bpf@...r.kernel.org
Cc: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
Andrii Nakryiko <andriin@...com>,
Quentin Monnet <quentin.monnet@...ronome.com>,
Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, Shuah Khan <shuah@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Jesper Dangaard Brouer <hawk@...nel.org>,
John Fastabend <john.fastabend@...il.com>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@...r.kernel.org>
Subject: Re: [PATCH bpf-next v2 5/5] selftests/bpf: Add test for "bpftool
feature" command
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.
Powered by blists - more mailing lists