[PATCH 2/3] acpi: method: fix _ON method never be tested.

Ivan Hu ivan.hu at canonical.com
Mon Mar 14 07:18:47 UTC 2016


ASL compiler pads a name shorter than 4 characters, it is done so with
trailing underscores (‘_’).

So fwts method should test with "_ON_".

Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
---
 src/acpi/method/method.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
index 95efce3..12dc667 100644
--- a/src/acpi/method/method.c
+++ b/src/acpi/method/method.c
@@ -2728,10 +2728,10 @@ static int method_test_GLK(fwts_framework *fw)
 /*
  * Section 7.1 Declaring a Power Resource Object
  */
-static int method_test_ON(fwts_framework *fw)
+static int method_test_ON_(fwts_framework *fw)
 {
 	return method_evaluate_method(fw, METHOD_OPTIONAL,
-		"_ON", NULL, 0, method_test_NULL_return, NULL);
+		"_ON_", NULL, 0, method_test_NULL_return, NULL);
 }
 
 static int method_test_OFF(fwts_framework *fw)
@@ -6954,7 +6954,7 @@ static fwts_framework_minor_test method_tests[] = {
 	/* Section 7.1 Declaring a Power Resource Object */
 
 	{ method_test_OFF, "Test _OFF (Set resource off)." },
-	{ method_test_ON,  "Test _ON  (Set resource on)." },
+	{ method_test_ON_,  "Test _ON_ (Set resource on)." },
 
 	/* Section 7.2 Device Power Management Objects */
 
-- 
1.9.1




More information about the fwts-devel mailing list