From: David Hunt Date: Wed, 12 May 2021 16:32:54 +0000 (+0100) Subject: test/power: fix turbo test X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=5bb0409b440bf43f38b90c196a66accd09a5bf8f;p=dpdk.git test/power: fix turbo test when turbo is enabled or disabled, the frequency is set to a low non-turbo frequency, so we need to set to the frequency expected by the test before checking. Fixes: aeaeaf5f2d62 ("test/power: add cases for turbo feature") Cc: stable@dpdk.org Signed-off-by: David Hunt --- diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c index c24b706f4f..0c3adc5f33 100644 --- a/app/test/test_power_cpufreq.c +++ b/app/test/test_power_cpufreq.c @@ -436,6 +436,12 @@ check_power_turbo(void) TEST_POWER_LCORE_ID); return -1; } + ret = rte_power_freq_max(TEST_POWER_LCORE_ID); + if (ret < 0) { + printf("Fail to scale up the freq to max on lcore %u\n", + TEST_POWER_LCORE_ID); + return -1; + } /* Check the current frequency */ ret = check_cur_freq(TEST_POWER_LCORE_ID, 0, true); @@ -455,6 +461,12 @@ check_power_turbo(void) TEST_POWER_LCORE_ID); return -1; } + ret = rte_power_freq_max(TEST_POWER_LCORE_ID); + if (ret < 0) { + printf("Fail to scale up the freq to max on lcore %u\n", + TEST_POWER_LCORE_ID); + return -1; + } /* Check the current frequency */ ret = check_cur_freq(TEST_POWER_LCORE_ID, 1, false);