ACK: [PATCH][RESEND] hpet: hpet_check: skip test3 if HPET address was not found (LP: #1257825)

IvanHu ivan.hu at canonical.com
Mon Dec 9 02:59:01 UTC 2013


On 12/05/2013 06:57 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> It makes no sense to run hpet_check test3 if the hpet base address could
> not be found. So skip this and inform the user why.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>   src/hpet/hpet_check/hpet_check.c | 13 +++++++++----
>   1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/src/hpet/hpet_check/hpet_check.c b/src/hpet/hpet_check/hpet_check.c
> index 14afbd7..e7ba6af 100644
> --- a/src/hpet/hpet_check/hpet_check.c
> +++ b/src/hpet/hpet_check/hpet_check.c
> @@ -180,7 +180,7 @@ static int hpet_check_test1(fwts_framework *fw)
>   	}
>
>   	if (hpet_base_p == 0) {
> -		fwts_log_info(fw, "No base address found for HPET.");
> +		fwts_log_info(fw, "No base address found for HPET in the kernel log.");
>   		return FWTS_ERROR;
>   	}
>
> @@ -357,11 +357,16 @@ static int hpet_check_test3(fwts_framework *fw)
>   {
>   	int i;
>
> +	if (hpet_base_p == 0) {
> +		fwts_log_info(fw, "Test skipped because HPET address was not found.");
> +		return FWTS_SKIP;
> +	}
> +
>   	hpet_check_base_acpi_table(fw, "DSDT", 0);
>
> -	for (i=0;i<11;i++) {
> +	for (i = 0; i< 11; i++)
>   		hpet_check_base_acpi_table(fw, "SSDT", i);
> -	}
> +
>   	return FWTS_OK;
>   }
>
> @@ -373,7 +378,7 @@ static int hpet_check_test4(fwts_framework *fw)
>   	uint32_t clk_period;
>
>   	if (hpet_base_p == 0) {
> -		fwts_log_info(fw, "Test skipped because previous test failed.");
> +		fwts_log_info(fw, "Test skipped because HPET address was not found.");
>   		return FWTS_SKIP;
>   	}
>
>

Acked-by: Ivan Hu <ivan.hu at canonical.com>



More information about the fwts-devel mailing list