From 43ee9331e024d857b529c2b54e73ba0d9e2f0fa0 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Mon, 1 Feb 2016 02:31:30 -0500 Subject: [PATCH] Fixed missing cpuinfo_max_freq on some Linux platforms --- cryptest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cryptest.sh b/cryptest.sh index eac9745a..ad5c9429 100755 --- a/cryptest.sh +++ b/cryptest.sh @@ -198,7 +198,7 @@ fi # Benchmarks expect frequency in GHz. CPU_FREQ=2.0 -if [ "$IS_LINUX" -ne "0" ]; then +if [ "$IS_LINUX" -ne "0" ] && [ -e "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq" ]; then CPU_FREQ=$(cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq) CPU_FREQ=$(awk "BEGIN {print $CPU_FREQ/1024/1024}") fi