mirror of
https://github.com/torvalds/linux.git
synced 2026-11-29 10:07:52 +00:00
Avoid replicated logic by having a common library to set the PYTHON environment variable. Reviewed-by: Athira Jajeev <[email protected]> Signed-off-by: Ian Rogers <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: James Clark <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Kan Liang <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
25 lines
730 B
Bash
Executable File
25 lines
730 B
Bash
Executable File
#!/bin/bash
|
|
# perf metrics value validation
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
shelldir=$(dirname "$0")
|
|
# shellcheck source=lib/setup_python.sh
|
|
. "${shelldir}"/lib/setup_python.sh
|
|
|
|
grep -q GenuineIntel /proc/cpuinfo || { echo Skipping non-Intel; exit 2; }
|
|
|
|
pythonvalidator=$(dirname $0)/lib/perf_metric_validation.py
|
|
rulefile=$(dirname $0)/lib/perf_metric_validation_rules.json
|
|
tmpdir=$(mktemp -d /tmp/__perf_test.program.XXXXX)
|
|
workload="perf bench futex hash -r 2 -s"
|
|
|
|
# Add -debug, save data file and full rule file
|
|
echo "Launch python validation script $pythonvalidator"
|
|
echo "Output will be stored in: $tmpdir"
|
|
$PYTHON $pythonvalidator -rule $rulefile -output_dir $tmpdir -wl "${workload}"
|
|
ret=$?
|
|
rm -rf $tmpdir
|
|
|
|
exit $ret
|
|
|