[PATCH] hpet: hpet_check: skip test3 if HPET address was not found (LP: #1257825)
Colin King
colin.king at canonical.com
Wed Dec 4 16:48:30 UTC 2013
From: Colin Ian King <colin.king at canonical.com>
It makes no sense to run hpet_check test3 if the hpet base address could
not be found. So skip this and inform the user why.
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
src/hpet/hpet_check/hpet_check.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/hpet/hpet_check/hpet_check.c b/src/hpet/hpet_check/hpet_check.c
index 14afbd7..485a400 100644
--- a/src/hpet/hpet_check/hpet_check.c
+++ b/src/hpet/hpet_check/hpet_check.c
@@ -72,6 +72,8 @@ static void hpet_parse_device_hpet(fwts_framework *fw,
for (;item != NULL; item = item->next) {
const char *str = fwts_text_list_text(item);
+ printf(">>%s\n", str);
+
if ((strstr(str, "Name") != NULL) &&
(strstr(str, "ResourceTemplate") != NULL)) {
fwts_list_link *tmp_item = item->next;
@@ -180,7 +182,7 @@ static int hpet_check_test1(fwts_framework *fw)
}
if (hpet_base_p == 0) {
- fwts_log_info(fw, "No base address found for HPET.");
+ fwts_log_info(fw, "No base address found for HPET in the kernel log.");
return FWTS_ERROR;
}
@@ -357,11 +359,16 @@ static int hpet_check_test3(fwts_framework *fw)
{
int i;
+ if (hpet_base_p == 0) {
+ fwts_log_info(fw, "Test skipped because HPET address was not found.");
+ return FWTS_SKIP;
+ }
+
hpet_check_base_acpi_table(fw, "DSDT", 0);
- for (i=0;i<11;i++) {
+ for (i = 0; i< 11; i++)
hpet_check_base_acpi_table(fw, "SSDT", i);
- }
+
return FWTS_OK;
}
@@ -373,7 +380,7 @@ static int hpet_check_test4(fwts_framework *fw)
uint32_t clk_period;
if (hpet_base_p == 0) {
- fwts_log_info(fw, "Test skipped because previous test failed.");
+ fwts_log_info(fw, "Test skipped because HPET address was not found.");
return FWTS_SKIP;
}
--
1.8.3.2
More information about the fwts-devel
mailing list