lkml.org 
[lkml]   [2020]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH bpf-next v2 5/5] selftests/bpf: Add test for "bpftool feature" command
From
Date
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.

\
 
 \ /
  Last update: 2020-02-25 14:26    [W:0.049 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site