ACK: Re: [PATCH] kernel: version: make test infoonly rather than pass/fail tests

Chris Van Hoof vanhoof at canonical.com
Wed Dec 12 05:21:43 UTC 2012


On 12/07/2012 01:33 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
> 
> Make these infoonly tests rather than pass or fail.  This is more
> friendly for non-x86 or non-ACPI systems or non-Ubuntu kernel systems.
> 
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  src/kernel/version/version.c | 30 +++++++++++++++++++-----------
>  1 file changed, 19 insertions(+), 11 deletions(-)
> 
> diff --git a/src/kernel/version/version.c b/src/kernel/version/version.c
> index 14f24a2..087937e 100644
> --- a/src/kernel/version/version.c
> +++ b/src/kernel/version/version.c
> @@ -25,13 +25,18 @@ static int version_test1(fwts_framework *fw)
>  
>  	/* Following is Ubuntu specific, so don't fail */
>  	if ((str = fwts_get("/proc/version_signature")) == NULL)
> -		fwts_warning(fw,
> -			"Cannot get version signature info from /proc/version_signature (This is Ubuntu specific, and not necessarily a failure).");
> +		fwts_log_info(fw,
> +			"Cannot get version signature info from "
> +			"/proc/version_signature (This is Ubuntu "
> +			"specific, and is not necessarily a failure).");
>  	else {
>  		fwts_chop_newline(str);
> -		fwts_passed(fw, "Signature: %s", str);
> +		fwts_log_info(fw, "Signature: %s", str);
>  		free(str);
>  	}
> +
> +	fwts_infoonly(fw);
> +
>  	return FWTS_OK;
>  }
>  
> @@ -41,14 +46,14 @@ static int version_test2(fwts_framework *fw)
>  
>  
>  	if ((str = fwts_get("/proc/version")) == NULL)
> -		fwts_failed(fw, LOG_LEVEL_LOW,
> -			"KernelProcVersion",
> -			"Cannot get version info from /proc/version");
> +		fwts_log_info(fw, "Cannot get version info from /proc/version");
>  	else {
>  		fwts_chop_newline(str);
> -		fwts_passed(fw, "Kernel Version: %s", str);
> +		fwts_log_info(fw, "Kernel Version: %s", str);
>  		free(str);
>  	}
> +	fwts_infoonly(fw);
> +
>  	return FWTS_OK;
>  }
>  
> @@ -58,14 +63,17 @@ static int version_test3(fwts_framework *fw)
>  
>          if (((str = fwts_get("/sys/module/acpi/parameters/acpica_version")) == NULL) &&
>  	    ((str = fwts_get("/proc/acpi/info")) == NULL))
> -		fwts_failed(fw, LOG_LEVEL_LOW,
> -			"KernelACPIVersion",
> -			"Cannot get ACPI version info from /sys/module/acpi/parameters/acpica_version or /proc/acpi/info");
> +		fwts_log_info(fw,
> +			"Cannot get ACPI version info from "
> +			"/sys/module/acpi/parameters/acpica_version "
> +			"or /proc/acpi/info, system does not have ACPI.");
>  	else {
>  		fwts_chop_newline(str);
> -		fwts_passed(fw, "ACPI Version: %s", str);
> +		fwts_log_info(fw, "ACPI Version: %s", str);
>  		free(str);
>  	}
> +	fwts_infoonly(fw);
> +
>  	return FWTS_OK;
>  }

Acked-by: Chris Van Hoof <vanhoof at canonical.com>




More information about the fwts-devel mailing list