[PATCH] cpu: maxfreq: skip when "model name" is not available
Alex Hung
alex.hung at canonical.com
Thu Dec 17 20:26:56 UTC 2020
Signed-off-by: Alex Hung <alex.hung at canonical.com>
---
src/cpu/maxfreq/maxfreq.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/cpu/maxfreq/maxfreq.c b/src/cpu/maxfreq/maxfreq.c
index a44c639a..41f43d65 100644
--- a/src/cpu/maxfreq/maxfreq.c
+++ b/src/cpu/maxfreq/maxfreq.c
@@ -18,8 +18,6 @@
*/
#include "fwts.h"
-#ifdef FWTS_ARCH_INTEL
-
#include <stdlib.h>
#include <stdbool.h>
#include <sys/types.h>
@@ -79,9 +77,11 @@ static int maxfreq_test1(fwts_framework *fw)
cpus++;
}
if (!cpus) {
- fwts_log_error(fw, "Cannot find any CPUs.");
fwts_list_free(cpuinfo, free);
- return FWTS_ERROR;
+ fwts_skipped(fw,
+ "Cannot read CPU model names from %s, this generally "
+ "happens on ARM CPUs, skipping test.", CPU_INFO_PATH);
+ return FWTS_SKIP;
}
if ((cpufreq = calloc(cpus, sizeof(double))) == NULL) {
@@ -215,4 +215,3 @@ static fwts_framework_ops maxfreq_ops = {
FWTS_REGISTER("maxfreq", &maxfreq_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH)
-#endif
--
2.25.1
More information about the fwts-devel
mailing list