ACK: [PATCH] cpu: maxfreq: skip when "model name" is not available
ivanhu
ivan.hu at canonical.com
Mon Dec 21 07:51:37 UTC 2020
On 12/18/20 4:26 AM, Alex Hung wrote:
> 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
>
Acked-by: Ivan Hu <ivan.hu at canonical.com>
More information about the fwts-devel
mailing list