[dpdk-stable] [dpdk-dev] [PATCH v3 2/3] test/power: fix a bug in cpufreq autotest
Burakov, Anatoly
anatoly.burakov at intel.com
Wed Apr 7 11:58:51 CEST 2021
On 07-Apr-21 8:46 AM, Richael Zhuang wrote:
> For platforms that don't support turbo boost,rte_power_turbo_status()
> returns "-ENOTSUP" (like power_kvm_vm_turbo_status()). So don't allow
> check_power_turbo() to continue if rte_power_turbo_status(TEST_POWER_LCORE_ID)!=1
>
> Fixes: aeaeaf5f2d62 ("test/power: add cases for turbo feature")
> Cc: lukaszx.krakowiak at intel.com
> Cc: stable at dpdk.org
>
> Signed-off-by: Richael Zhuang <richael.zhuang at arm.com>
> ---
> app/test/test_power_cpufreq.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c
> index 1f4d8bb05..cda74bd8a 100644
> --- a/app/test/test_power_cpufreq.c
> +++ b/app/test/test_power_cpufreq.c
> @@ -386,7 +386,7 @@ check_power_turbo(void)
> {
> int ret;
>
> - if (rte_power_turbo_status(TEST_POWER_LCORE_ID) == 0) {
> + if (rte_power_turbo_status(TEST_POWER_LCORE_ID) != 1) {
> printf("Turbo not available on lcore %u, skipping test\n",
> TEST_POWER_LCORE_ID);
> return 0;
>
If what you're really checking is -ENOTSUP, maybe check for that?
Because otherwise it seems like you're making unwarranted assumptions
about why the call failed...
--
Thanks,
Anatoly
More information about the stable
mailing list