[PATCH 12/30] acpi: acpitables: remove redudant acpi table checking
Colin King
colin.king at canonical.com
Thu Jun 18 08:49:24 UTC 2015
From: Colin Ian King <colin.king at canonical.com>
test1 can now be removed and rename test2 to test1. Remove
the acpi table checks now that they have been moved to
sources in the acpi tests directory
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
src/acpi/acpitables/acpitables.c | 44 +++-------------------------------------
1 file changed, 3 insertions(+), 41 deletions(-)
diff --git a/src/acpi/acpitables/acpitables.c b/src/acpi/acpitables/acpitables.c
index 5af9aa2..76d8c16 100644
--- a/src/acpi/acpitables/acpitables.c
+++ b/src/acpi/acpitables/acpitables.c
@@ -25,43 +25,6 @@
#include "fwts.h"
-typedef void (*check_func)(fwts_framework *fw, fwts_acpi_table_info *table);
-
-typedef struct {
- char *name;
- check_func func;
-} acpi_table_check_table;
-
-static acpi_table_check_table check_table[] = {
- { NULL , NULL },
-} ;
-
-static int acpi_table_check_test1(fwts_framework *fw)
-{
- int i;
-
- for (i=0; check_table[i].name != NULL; i++) {
- uint32_t failed = fw->minor_tests.failed;
- fwts_acpi_table_info *table;
-
- if (fwts_acpi_find_table(fw, check_table[i].name, 0, &table) != FWTS_OK) {
- fwts_aborted(fw, "Cannot load ACPI table %s.", check_table[i].name);
- /* If this fails, we cannot load any subsequent tables so abort */
- break;
- }
-
- if (table) {
- check_table[i].func(fw, table);
- if (failed == fw->minor_tests.failed)
- fwts_passed(fw, "Table %s passed.", check_table[i].name);
- } else {
- fwts_log_info(fw, "Table %s not present to check.", check_table[i].name);
- }
- }
-
- return FWTS_OK;
-}
-
static bool acpi_table_check_field(const char *field, const size_t len)
{
size_t i;
@@ -89,7 +52,7 @@ static bool acpi_table_check_field_test(
return true;
}
-static int acpi_table_check_test2(fwts_framework *fw)
+static int acpi_table_check_test1(fwts_framework *fw)
{
int i;
bool checked = false;
@@ -153,13 +116,12 @@ static int acpi_table_check_test2(fwts_framework *fw)
}
static fwts_framework_minor_test acpi_table_check_tests[] = {
- { acpi_table_check_test1, "Test ACPI tables." },
- { acpi_table_check_test2, "Test ACPI headers." },
+ { acpi_table_check_test1, "Test ACPI headers." },
{ NULL, NULL }
};
static fwts_framework_ops acpi_table_check_ops = {
- .description = "ACPI table settings sanity tests.",
+ .description = "ACPI table headers sanity tests.",
.minor_tests = acpi_table_check_tests
};
--
2.1.4
More information about the fwts-devel
mailing list