diff mbox

[5/6] acpi: tpm2: Show test as skipped if table does not exist

Message ID 1476472642-29871-6-git-send-email-jhugo@codeaurora.org
State Accepted
Headers show

Commit Message

Jeffrey Hugo Oct. 14, 2016, 7:17 p.m. UTC
If the table does not exist, the error message states the test is being
skipped, however the test is categorized as aborted.  The majority of other
tests are categorized as skipped under this scenario.  Update the init path
to return a SKIP error to categorize the test result similar to other tests.

Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
---
 src/acpi/tpm2/tpm2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ivan Hu Oct. 17, 2016, 8:08 a.m. UTC | #1
On 2016年10月15日 03:17, Jeffrey Hugo wrote:
> If the table does not exist, the error message states the test is being
> skipped, however the test is categorized as aborted.  The majority of other
> tests are categorized as skipped under this scenario.  Update the init path
> to return a SKIP error to categorize the test result similar to other tests.
>
> Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
> ---
>  src/acpi/tpm2/tpm2.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/acpi/tpm2/tpm2.c b/src/acpi/tpm2/tpm2.c
> index f4efd83..7c8c4dd 100644
> --- a/src/acpi/tpm2/tpm2.c
> +++ b/src/acpi/tpm2/tpm2.c
> @@ -33,7 +33,7 @@ static int tpm2_init(fwts_framework *fw)
>  	}
>  	if (table == NULL) {
>  		fwts_log_error(fw, "ACPI TPM2 table does not exist, skipping test");
> -		return FWTS_ERROR;
> +		return FWTS_SKIP;
>  	}
>
>  	return FWTS_OK;
>

Acked-by: Ivan Hu <ivan.hu@canonical.com>
Colin Ian King Oct. 17, 2016, 8:15 a.m. UTC | #2
On 14/10/16 20:17, Jeffrey Hugo wrote:
> If the table does not exist, the error message states the test is being
> skipped, however the test is categorized as aborted.  The majority of other
> tests are categorized as skipped under this scenario.  Update the init path
> to return a SKIP error to categorize the test result similar to other tests.
> 
> Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
> ---
>  src/acpi/tpm2/tpm2.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/acpi/tpm2/tpm2.c b/src/acpi/tpm2/tpm2.c
> index f4efd83..7c8c4dd 100644
> --- a/src/acpi/tpm2/tpm2.c
> +++ b/src/acpi/tpm2/tpm2.c
> @@ -33,7 +33,7 @@ static int tpm2_init(fwts_framework *fw)
>  	}
>  	if (table == NULL) {
>  		fwts_log_error(fw, "ACPI TPM2 table does not exist, skipping test");
> -		return FWTS_ERROR;
> +		return FWTS_SKIP;
>  	}
>  
>  	return FWTS_OK;
> 
Acked-by: Colin Ian King <colin.king@canonical.com>
diff mbox

Patch

diff --git a/src/acpi/tpm2/tpm2.c b/src/acpi/tpm2/tpm2.c
index f4efd83..7c8c4dd 100644
--- a/src/acpi/tpm2/tpm2.c
+++ b/src/acpi/tpm2/tpm2.c
@@ -33,7 +33,7 @@  static int tpm2_init(fwts_framework *fw)
 	}
 	if (table == NULL) {
 		fwts_log_error(fw, "ACPI TPM2 table does not exist, skipping test");
-		return FWTS_ERROR;
+		return FWTS_SKIP;
 	}
 
 	return FWTS_OK;