[PATCH 1/2] acpi: wakealarm: enable for non-x86 devices (LP: #1182630)
Colin King
colin.king at canonical.com
Mon Jun 3 09:15:16 UTC 2013
From: Colin Ian King <colin.king at canonical.com>
Some non-x86 devices support wakealarm, so remove the x86 only
restriction. Make tests 2..4 abort if test 1 detects no wakealarm
interface rather than tripping failures.
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
src/acpi/wakealarm/wakealarm.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/src/acpi/wakealarm/wakealarm.c b/src/acpi/wakealarm/wakealarm.c
index 5873483..b9736ca 100644
--- a/src/acpi/wakealarm/wakealarm.c
+++ b/src/acpi/wakealarm/wakealarm.c
@@ -18,8 +18,6 @@
*/
#include "fwts.h"
-#ifdef FWTS_ARCH_INTEL
-
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
@@ -35,9 +33,23 @@ static int wakealarm_test1(fwts_framework *fw)
if (stat(wkalarm, &buf) == 0)
fwts_passed(fw, WAKEALARM " found.");
- else
+ else {
fwts_failed(fw, LOG_LEVEL_MEDIUM, "NoWakeAlarmTest1",
"Could not find " WAKEALARM ".");
+#ifdef FWTS_ARCH_INTEL
+ /* For x86 devices, this is considered a failure */
+ fwts_advice(fw,
+ "x86 devices generally should have an RTC wake alarm that "
+ "is normally controlled by the " WAKEALARM " interface. This interface "
+ "does not exist, so the wake alarm tests will be aborted.");
+#else
+ fwts_advice(fw,
+ "non-x86 devices sometimes do not have an RTC wake alarm that "
+ "is normally controlled by the " WAKEALARM " interface. This "
+ "interface does not exist, so the wake alarm tests will be aborted.");
+#endif
+ return FWTS_ABORTED;
+ }
return FWTS_OK;
}
@@ -123,5 +135,3 @@ static fwts_framework_ops wakealarm_ops = {
};
FWTS_REGISTER("wakealarm", &wakealarm_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH | FWTS_FLAG_ROOT_PRIV);
-
-#endif
--
1.8.1.2
More information about the fwts-devel
mailing list