diff mbox series

[v1,2/2] test/power: fix a bug in cpufreq autotest

Message ID 20210406030459.10261-1-richael.zhuang@arm.com (mailing list archive)
State Superseded
Delegated to: Thomas Monjalon
Headers show
Series None | expand


Context Check Description
ci/checkpatch warning coding style issues

Commit Message

Richael Zhuang April 6, 2021, 3:04 a.m. UTC
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@intel.com
Cc: stable@dpdk.org

CustomizedGitHooks: yes
Change-Id: I5702d5c647e941253c556ae2be8c1edeefacb618
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
 app/test/test_power_cpufreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
diff mbox series


diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c
index c4f4541ac..7a93bc90a 100644
--- a/app/test/test_power_cpufreq.c
+++ b/app/test/test_power_cpufreq.c
@@ -389,7 +389,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",
                return 0;