test/power: round CPU frequency to check
authorRichael Zhuang <richael.zhuang@arm.com>
Thu, 15 Apr 2021 05:59:30 +0000 (13:59 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 21 Apr 2021 17:19:58 +0000 (19:19 +0200)
commit606a234c6d3607c93a0426bdccdbf9aaa2b8e5f6
tree4634ccccbe41ed058d9c7d46288dcbc9d5d5f0fa
parent00456850be40d8b663d1066763ddedffe4346585
test/power: round CPU frequency to check

The value in "/sys/.../cpuinfo_cur_freq" may not be exactly the
same as what was set. For example, if "2400000" is written to
"/sys/.../cpufreq/scaling_setspeed" to set the frequency, then the
value in "/sys/.../cpuinfo_cur_freq" may be "2401222". So need to
round the value.

Fixes: ed7c51a6a680 ("app/test: vm power management")
Cc: stable@dpdk.org
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Reviewed-by: David Hunt <david.hunt@intel.com>
app/test/test_power_cpufreq.c