test/power: fix CPU frequency when turbo enabled
authorRichael Zhuang <richael.zhuang@arm.com>
Fri, 9 Jul 2021 10:55:48 +0000 (18:55 +0800)
committerDavid Marchand <david.marchand@redhat.com>
Fri, 9 Jul 2021 14:04:48 +0000 (16:04 +0200)
commit29343b9030e38e8c3519ba01cb66724d45b13dc8
tree58622c1bef9ee70782c01b16092137045b7f752c
parentef1cc88f183702f523bf2701e1d3984a31b08ab4
test/power: fix CPU frequency when turbo enabled

On arm platform, the value in "/sys/.../cpuinfo_cur_freq" may not
be exactly the same as what was set when using CPPC cpufreq driver.
For other cpufreq driver, no need to round it currently, or else
this check will fail with turbo enabled. For example, with acpi_cpufreq,
cpuinfo_cur_freq can be 2401000 which is equal to freqs[0].It should
not be rounded to 2400000.

Fixes: 606a234c6d360 ("test/power: round CPU frequency to check")
Cc: stable@dpdk.org
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Acked-by: David Hunt <david.hunt@intel.com>
app/test/test_power_cpufreq.c