Re: [PATCH bpf-next v2 5/5] selftests/bpf: Add test for "bpftool feature" command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux