• German Gomez's avatar
    perf test arm-spe: Check if perf-record hangs when recording workload with forks · 4f52ca13
    German Gomez authored
    Add shell test to check if perf-record hangs when recording an arm_spe
    event with forks.
    
    The test FAILS if the Kernel is not patched with Commit 961c3912 ("perf:
    Always wake the parent event").
    
    Unpatched Kernel:
    
      $ perf test -v 90
      90: Check Arm SPE doesn't hang when there are forks
      --- start ---
      test child forked, pid 14232
      Recording workload with fork
      Log lines = 90 /tmp/__perf_test.stderr.0Nu0U
      Log lines after 1 second = 90 /tmp/__perf_test.stderr.0Nu0U
      SPE hang test: FAIL
      test child finished with -1
      ---- end ----
      Check Arm SPE trace data in workload with forks: FAILED!
    
    Patched Kernel:
    
      $ perf test -v 90
      90: Check Arm SPE doesn't hang when there are forks
      --- start ---
      test child forked, pid 2930
      Compiling test program...
      Recording workload...
      Log lines = 478 /tmp/__perf_test.log.026AI
      Log lines after 1 second = 557 /tmp/__perf_test.log.026AI
      SPE hang test: PASS
      Cleaning up files...
      test child finished with 0
      ---- end ----
      Check Arm SPE trace data in workload with forks: Ok
    Reviewed-by: default avatarJames Clark <james.clark@arm.com>
    Reviewed-by: default avatarLeo Yan <leo.yan@linaro.org>
    Signed-off-by: default avatarGerman Gomez <german.gomez@arm.com>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Link: https://lore.kernel.org/r/20220228165655.3920-1-german.gomez@arm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    4f52ca13
test_arm_spe_fork.sh 1.83 KB