test/power: fix CPU frequency check
authorDavid Hunt <david.hunt@intel.com>
Wed, 12 May 2021 16:32:51 +0000 (17:32 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 12 May 2021 20:00:45 +0000 (22:00 +0200)
commitff6dfb8e492f1cfa8755150816d888541e2cd7c7
tree7d44b2b10f7e6978f0ed96e0cbdf2f8d16a5d8d0
parent705b04af1c100c464b6d9238408e84cfeffc489c
test/power: fix CPU frequency check

Different drivers present the current cpu core frequency in different
sysfs files. Some present it in cpuinfo_cur_freq, some in scaling_cur_freq,
and some actually present it in both.

This patch attempts to open one, if that fails, tries the other.

Fixes: d550a8cc31f3 ("app/test: enhance power manager unit tests")
Cc: stable@dpdk.org
Signed-off-by: David Hunt <david.hunt@intel.com>
app/test/test_power_cpufreq.c