• W
    perf test: Print result for each LLVM subtest · e8c6d500
    Wang Nan 提交于
    Currently 'perf test llvm' and 'perf test BPF' have multiple sub-tests,
    but the result is provided in only one line:
    
      # perf test LLVM
      35: Test LLVM searching and compiling                        : Ok
    
    This patch introduces sub-tests support, allowing 'perf test' to report
    result for each sub-tests:
    
      # perf test LLVM
      35: Test LLVM searching and compiling                        :
      35.1: Basic BPF llvm compiling test                          : Ok
      35.2: Test kbuild searching                                  : Ok
      35.3: Compile source for BPF prologue generation test        : Ok
    
    When a failure happens:
    
      # cat ~/.perfconfig
      [llvm]
           clang-path = "/bin/false"
      # perf test LLVM
      35: Test LLVM searching and compiling                        :
      35.1: Basic BPF llvm compiling test                          : FAILED!
      35.2: Test kbuild searching                                  : Skip
      35.3: Compile source for BPF prologue generation test        : Skip
    
    And:
    
      # rm ~/.perfconfig
      # ./perf test LLVM
      35: Test LLVM searching and compiling                        :
      35.1: Basic BPF llvm compiling test                          : Skip
      35.2: Test kbuild searching                                  : Skip
      35.3: Compile source for BPF prologue generation test        : Skip
    
    Skip by user:
    
      # ./perf test -s 1,`seq -s , 3 42`
       1: vmlinux symtab matches kallsyms                          : Skip (user override)
       2: detect openat syscall event                              : Ok
      ...
      35: Test LLVM searching and compiling                        : Skip (user override)
      ...
    Suggested-and-Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
    Signed-off-by: NWang Nan <wangnan0@huawei.com>
    Cc: Alexei Starovoitov <ast@kernel.org>
    Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
    Cc: Zefan Li <lizefan@huawei.com>
    Cc: pi3orama@163.com
    Link: http://lkml.kernel.org/r/1447749170-175898-4-git-send-email-wangnan0@huawei.com
    [ Changed so that func is not on an anonymous union ]
    Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
    e8c6d500
tests.h 2.5 KB