[PATCH 3/6] acpi: s3: force enable /sys/power/pm_debug_messages (LP: #1772563)
Colin King
colin.king at canonical.com
Thu Jun 7 14:05:53 UTC 2018
From: Colin Ian King <colin.king at canonical.com>
Some kernels may not have this set to 1 to get PM debug messages
for the S3 cycle, so force enable it on and then restore it back
after the test.
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
src/acpi/s3/s3.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/acpi/s3/s3.c b/src/acpi/s3/s3.c
index c2d0b0f1..e27fb2df 100644
--- a/src/acpi/s3/s3.c
+++ b/src/acpi/s3/s3.c
@@ -493,6 +493,7 @@ static int s3_test_multiple(fwts_framework *fw)
int resume_too_long = 0;
int awake_delay = s3_min_delay * 1000;
int delta = (int)(s3_delay_delta * 1000.0);
+ int pm_debug;
#if FWTS_ENABLE_LOGIND
#if !GLIB_CHECK_VERSION(2,35,0)
@@ -501,6 +502,9 @@ static int s3_test_multiple(fwts_framework *fw)
#endif
#endif
+ (void)fwts_pm_debug_get(&pm_debug);
+ (void)fwts_pm_debug_set(1);
+
if (s3_multiple == 1)
fwts_log_info(fw, "Defaulted to 1 test, use --s3-multiple=N to run more S3 cycles\n");
@@ -559,6 +563,10 @@ static int s3_test_multiple(fwts_framework *fw)
}
}
+ /* Restore pm debug value */
+ if (pm_debug != -1)
+ (void)fwts_pm_debug_set(pm_debug);
+
fwts_log_info(fw, "Completed S3 cycle(s)\n");
if (klog_errors > 0)
--
2.17.0
More information about the fwts-devel
mailing list