Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
test/power: fix turbo test
[ upstream commit 5bb0409 ]

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: aeaeaf5 ("test/power: add cases for turbo feature")

Signed-off-by: David Hunt <david.hunt@intel.com>
  • Loading branch information
climberhunt authored and cpaelzer committed Jun 10, 2021
1 parent 4664acc commit c3761e4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/test/test_power_cpufreq.c
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit c3761e4

Please sign in to comment.