ACK: [PATCH 3/3] acpi: fan: add more granularity to progress feedback

Alex Hung alex.hung at canonical.com
Fri May 23 04:03:17 UTC 2014


On 05/21/2014 07:55 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> The fan test shows little progress feedback when running the
> 20 second CPU load warm-up which can alarm some users because
> it looks like the test has frozen.  Add some more granularity
> to the progress feedback to fix this.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>   src/acpi/fan/fan.c | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/src/acpi/fan/fan.c b/src/acpi/fan/fan.c
> index f12666e..9bd5da0 100644
> --- a/src/acpi/fan/fan.c
> +++ b/src/acpi/fan/fan.c
> @@ -173,6 +173,7 @@ static int fan_test2(fwts_framework *fw)
>   	fwts_list *fans1, *fans2;
>   	fwts_list_link *item1, *item2;
>   	bool changed = false;
> +	int i;
>
>   	fwts_log_info(fw,
>   		"Test how many fans there are in the system. "
> @@ -188,7 +189,11 @@ static int fan_test2(fwts_framework *fw)
>   	}
>
>   	fwts_log_info(fw, "Loading CPUs for 20 seconds to try and get fan speeds to change.");
> -	fwts_cpu_consume(20);
> +	for (i = 0; i < 20; i++) {
> +		fwts_progress(fw, (1+i) * 5);
> +		fwts_cpu_consume(1);
> +	}
> +	fwts_progress(fw, 100);
>
>   	if ((fans2 = get_fan_info(fw)) == NULL) {
>   		fwts_list_free(fans1, free_fan_info);
>

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



More information about the fwts-devel mailing list