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

Alex Hung alex.hung at canonical.com
Wed Jun 17 19:24:40 UTC 2020


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);
 			}
 		}
 	}
-- 
2.25.1




More information about the fwts-devel mailing list