Patchwork cpu: microcode: test should skip if no microcound found (LP: #1259900)

login
register
mail settings
Submitter Colin King
Date Dec. 11, 2013, noon
Message ID <1386763219-11889-1-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/300021/
State Accepted
Headers show

Comments

Colin King - Dec. 11, 2013, noon
From: Colin Ian King <colin.king@canonical.com>

If microcode is not found we should skip the test rather than not report
a pass or fail.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/cpu/microcode/microcode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Ivan Hu - Dec. 12, 2013, 1:48 a.m.
On 12/11/2013 08:00 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> If microcode is not found we should skip the test rather than not report
> a pass or fail.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/cpu/microcode/microcode.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/cpu/microcode/microcode.c b/src/cpu/microcode/microcode.c
> index 8794c6c..d9dad9b 100644
> --- a/src/cpu/microcode/microcode.c
> +++ b/src/cpu/microcode/microcode.c
> @@ -288,7 +288,7 @@ static int microcode_test1(fwts_framework *fw)
>   		if (passed > 0)
>   			fwts_passed(fw, "%d CPU(s) have the latest microcode loaded.", passed);
>   		else
> -			fwts_log_info(fw, "Could not determine from kernel log if latest microcode has been loaded.");
> +			fwts_skipped(fw, "Could not determine from kernel log if latest microcode has been loaded.");
>   	}
>
>   	closedir(dir);
>

Acked-by: Ivan Hu <ivan.hu@canonical.com>
Alex Hung - Dec. 12, 2013, 9:43 a.m.
On 12/11/2013 08:00 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> If microcode is not found we should skip the test rather than not report
> a pass or fail.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/cpu/microcode/microcode.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/cpu/microcode/microcode.c b/src/cpu/microcode/microcode.c
> index 8794c6c..d9dad9b 100644
> --- a/src/cpu/microcode/microcode.c
> +++ b/src/cpu/microcode/microcode.c
> @@ -288,7 +288,7 @@ static int microcode_test1(fwts_framework *fw)
>   		if (passed > 0)
>   			fwts_passed(fw, "%d CPU(s) have the latest microcode loaded.", passed);
>   		else
> -			fwts_log_info(fw, "Could not determine from kernel log if latest microcode has been loaded.");
> +			fwts_skipped(fw, "Could not determine from kernel log if latest microcode has been loaded.");
>   	}
>
>   	closedir(dir);
>

Acked-by: Alex Hung <alex.hung@canonical.com>

Patch

diff --git a/src/cpu/microcode/microcode.c b/src/cpu/microcode/microcode.c
index 8794c6c..d9dad9b 100644
--- a/src/cpu/microcode/microcode.c
+++ b/src/cpu/microcode/microcode.c
@@ -288,7 +288,7 @@  static int microcode_test1(fwts_framework *fw)
 		if (passed > 0)
 			fwts_passed(fw, "%d CPU(s) have the latest microcode loaded.", passed);
 		else
-			fwts_log_info(fw, "Could not determine from kernel log if latest microcode has been loaded.");
+			fwts_skipped(fw, "Could not determine from kernel log if latest microcode has been loaded.");
 	}
 
 	closedir(dir);