perf tests attr: Add missing topdown metrics events
authorKan Liang <kan.liang@linux.intel.com>
Thu, 30 Sep 2021 19:52:46 +0000 (12:52 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 5 Oct 2021 17:55:38 +0000 (14:55 -0300)
commit0b6c5371c03c2b17963e1abd7ed0e3f1f950cba9
tree36dd8a14c5281c8ece37fb14b0cd98d194280c64
parent9fce636e5c7dd84873f096ae4d094fb6bd797f9f
perf tests attr: Add missing topdown metrics events

The Topdown metrics events were added as 'perf stat' default events
since commit 42641d6f4d15e6db ("perf stat: Add Topdown metrics events as
default events").

However, the perf attr tests were not updated
accordingly.

The perf attr test fails on the platform which supports Topdown metrics.

  # perf test 17

    17: Setup struct perf_event_attr        :FAILED!

Add Topdown metrics events into perf attr test cases. Make them optional
since they are only available on newer platforms.

Fixes: 42641d6f4d15e6db ("perf stat: Add Topdown metrics events as default events")
Reported-by: kernel test robot <oliver.sang@intel.com>
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lore.kernel.org/lkml/1633031566-176517-1-git-send-email-kan.liang@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/attr/test-stat-default
tools/perf/tests/attr/test-stat-detailed-1
tools/perf/tests/attr/test-stat-detailed-2
tools/perf/tests/attr/test-stat-detailed-3