Re: [PATCH v2 bpf-next] selftests/bpf: Improve by-name subtest selection logic in prog_tests

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

 




> On Apr 8, 2022, at 3:15 PM, Andrii Nakryiko <andrii.nakryiko@xxxxxxxxx> wrote:
> 
> On Wed, Apr 6, 2022 at 1:37 PM Mykola Lysenko <mykolal@xxxxxx> wrote:
>> 
>> Improve subtest selection logic when using -t/-a/-d parameters.
>> In particular, more than one subtest can be specified or a
>> combination of tests / subtests.
>> 
>> -a send_signal -d send_signal/send_signal_nmi* - runs send_signal
>> test without nmi tests
>> 
>> -a send_signal/send_signal_nmi*,find_vma - runs two send_signal
>> subtests and find_vma test
>> 
>> -a 'send_signal*' -a find_vma -d send_signal/send_signal_nmi* -
>> runs 2 send_signal test and find_vma test. Disables two send_signal
>> nmi subtests
>> 
>> -t send_signal -t find_vma - runs two *send_signal* tests and one
>> *find_vma* test
>> 
>> This will allow us to have granular control over which subtests
>> to disable in the CI system instead of disabling whole tests.
>> 
>> Also, add new selftest to avoid possible regression when
>> changing prog_test test name selection logic.
>> 
>> Signed-off-by: Mykola Lysenko <mykolal@xxxxxx>
>> ---
> 
> Unfortunately there is some regression introduced by these changes,
> which is not easy to spot unless you try hard because of the annoying
> lack of visibility into subtest results. But if you try running:
> 
> sudo ./test_progs -v -t bpf_cookie/trace
> 
> You'll notice that with our change we don't execute any subtest at
> all. While before we'd execute bpf_cookie/tracepoint subtest properly.
> Please take a look, must be some subtle thing somewhere.

Good catch. It is because I am not adding ‘*’ character around subtest name when -t parameter is used. Let me fix this.

Will add test around this as well.

> 
>> .../selftests/bpf/prog_tests/arg_parsing.c | 99 +++++++++++
>> tools/testing/selftests/bpf/test_progs.c | 156 +++++++++---------
>> tools/testing/selftests/bpf/test_progs.h | 15 +-
>> tools/testing/selftests/bpf/testing_helpers.c | 84 ++++++++++
>> tools/testing/selftests/bpf/testing_helpers.h | 8 +
>> 5 files changed, 275 insertions(+), 87 deletions(-)
>> create mode 100644 tools/testing/selftests/bpf/prog_tests/arg_parsing.c
> 
> [...]





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux