summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/amd-pstate/run.sh
AgeCommit message (Collapse)AuthorFilesLines
2023-10-16selftests/amd-pstate: Added option to provide perf binary pathSwapnil Sapkal1-3/+9
In selftests/amd-pstate, distro `perf` is used to capture `perf stat` while running microbenchmarks. Distro `perf` is not working with upstream kernel. Fix this by providing an option to give the perf binary path. Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Swapnil Sapkal <swapnil.sapkal@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2023-10-16selftests/amd-pstate: Fix broken paths to run workloads in amd-pstate-utSwapnil Sapkal1-3/+6
In selftests/amd-pstate, tbench and gitsource microbenchmarks are used to compare the performance with different governors. In current implementation the relative path to run `amd_pstate_tracer.py` is broken. Fix this by using absolute paths. Signed-off-by: Swapnil Sapkal <swapnil.sapkal@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2023-03-07kselftest: amd-pstate: Fix spelling mistakesSukrut Bellary1-2/+2
Fix spelling mistakes in run.sh "drvier" => "driver" and in gitsource.sh "senconds" => "seconds". Signed-off-by: Sukrut Bellary <sukrut.bellary@gmail.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2022-11-01selftests: amd-pstate: Trigger gitsource benchmark and test cpusMeng Li1-6/+26
Add gitsource.sh trigger the gitsource testing and monitor the cpu desire performance, frequency, load, power consumption and throughput etc. 1) Download and tar gitsource codes. 2) Run gitsource benchmark on specific governors, ondemand or schedutil. 3) Run tbench benchmark comparative test on acpi-cpufreq kernel driver. 4) Get desire performance, frequency, load by perf. 5) Get power consumption and throughput by amd_pstate_trace.py. 6) Get run time by /usr/bin/time. 7) Analyse test results and save it in file selftest.gitsource.csv. 8) Plot png images about time, energy and performance per watt for each test. Fixed whitespace error during commit: Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Meng Li <li.meng@amd.com> Acked-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2022-11-01selftests: amd-pstate: Trigger tbench benchmark and test cpusMeng Li1-10/+235
Add tbench.sh trigger the tbench testing and monitor the cpu desire performance, frequency, load, power consumption and throughput etc. Signed-off-by: Meng Li <li.meng@amd.com> Acked-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2022-11-01selftests: amd-pstate: Split basic.sh into run.sh and basic.sh.Meng Li1-0/+142
Split basic.sh into run.sh and basic.sh. The modification makes basic.sh more pure, just for test basic kernel functions. The file of run.sh mainly contains functions such as test entry, parameter check, prerequisite and log clearing etc. Then you can specify test case in kselftest/amd-pstate, for example: sudo ./run.sh -c basic. The detail please run the below script. ./run.sh --help Signed-off-by: Meng Li <li.meng@amd.com> Acked-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>