perf test: Add mechanism for skipping attr tests on auxiliary vector values
authorJames Clark <james.clark@arm.com>
Tue, 13 Dec 2022 11:47:37 +0000 (11:47 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 14 Dec 2022 14:24:32 +0000 (11:24 -0300)
commitc3a8f85351b15167d6c8d178656df82ba3c34712
tree90f744cda2c336dfda09f05a8a5b7ec6083c43f1
parenta8f26192ca769c6b37a04b3ee188f28069fd5d53
perf test: Add mechanism for skipping attr tests on auxiliary vector values

This can be used to skip tests or provide different test values on
different platforms. For example to run a test only where Arm SVE is
present add this to the config section:

  auxv    = auxv["AT_HWCAP"] & 0x200000 == 0x200000

The value is a freeform Python expression that is evaled in the context
of a map called "auxv" that contains the decoded auxiliary vector.

Signed-off-by: James Clark <james.clark@arm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: bpf@vger.kernel.org
Link: https://lore.kernel.org/r/20221213114739.2312862-3-james.clark@arm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/attr.py