• Mykola Lysenko's avatar
    bpf/selftests: Add granular subtest output for prog_test · 09252259
    Mykola Lysenko authored
    Implement per subtest log collection for both parallel
    and sequential test execution. This allows granular
    per-subtest error output in the 'All error logs' section.
    Add subtest log transfer into the protocol during the
    parallel test execution.
    
    Move all test log printing logic into dump_test_log
    function. One exception is the output of test names when
    verbose printing is enabled. Move test name/result
    printing into separate functions to avoid repetition.
    
    Print all successful subtest results in the log. Print
    only failed test logs when test does not have subtests.
    Or only failed subtests' logs when test has subtests.
    
    Disable 'All error logs' output when verbose mode is
    enabled. This functionality was already broken and is
    causing confusion.
    Signed-off-by: default avatarMykola Lysenko <mykolal@fb.com>
    Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
    Link: https://lore.kernel.org/bpf/20220427041353.246007-1-mykolal@fb.com
    09252259
test_progs.h 10.2 KB