ACK: [PATCH] acpitables: add table name outputs to revision tests

ivanhu ivan.hu at canonical.com
Fri Jun 19 07:03:09 UTC 2020



On 6/18/20 3:24 AM, Alex Hung wrote:
> This provides information on what tables are checked.
> 
> Signed-off-by: Alex Hung <alex.hung at canonical.com>
> ---
>  src/acpi/acpitables/acpitables.c | 16 +++++++++-------
>  1 file changed, 9 insertions(+), 7 deletions(-)
> 
> diff --git a/src/acpi/acpitables/acpitables.c b/src/acpi/acpitables/acpitables.c
> index a6b7120a..1a4a8d83 100644
> --- a/src/acpi/acpitables/acpitables.c
> +++ b/src/acpi/acpitables/acpitables.c
> @@ -256,13 +256,15 @@ static int acpi_table_check_test2(fwts_framework *fw)
>  			if (!table_rev->name)
>  				break;
>  
> -			if (!strncmp(info->name, table_rev->name, 4) &&
> -			    table_rev->revision != hdr->revision) {
> -				failed = true;
> -				fwts_failed(fw, LOG_LEVEL_MEDIUM, "ACPITableBadRevision",
> -					"ACPI Table %s revision was expected to be %" PRIu8
> -					", got %" PRIu8 ".", info->name, table_rev->revision,
> -					hdr->revision);
> +			if (!strncmp(info->name, table_rev->name, 4)) {
> +				if (table_rev->revision != hdr->revision) {
> +					failed = true;
> +					fwts_failed(fw, LOG_LEVEL_MEDIUM, "ACPITableBadRevision",
> +						"ACPI Table %s revision was expected to be %" PRIu8
> +						", got %" PRIu8 ".", info->name, table_rev->revision,
> +						hdr->revision);
> +				} else
> +					fwts_log_info(fw, "Table %s has a matched revision.", info->name);
>  			}
>  		}
>  	}
> 

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



More information about the fwts-devel mailing list