diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-07-27 17:36:56 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-07-29 11:12:13 +0200 |
commit | c550cb7f8cbd4727cb484e6ef30fc6b95d7e4d34 (patch) | |
tree | db2e33707a76d6b2eb93a326602eb731dcf6550a /src/test/test-sleep.c | |
parent | test-ndisc-rs: increase timeouts (diff) | |
download | systemd-c550cb7f8cbd4727cb484e6ef30fc6b95d7e4d34.tar.xz systemd-c550cb7f8cbd4727cb484e6ef30fc6b95d7e4d34.zip |
test-sleep: add more logging, show secure boot mode
In https://bugzilla.redhat.com/show_bug.cgi?id=1858219 a user
reported that hibernation is not supported. This is probably caused
by secure boot, but our current logging does not make this
obvious.
Diffstat (limited to '')
-rw-r--r-- | src/test/test-sleep.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/test/test-sleep.c b/src/test/test-sleep.c index 2e63aace02..8b4fa82640 100644 --- a/src/test/test-sleep.c +++ b/src/test/test-sleep.c @@ -7,6 +7,7 @@ #include <sys/types.h> #include <unistd.h> +#include "efivars.h" #include "errno-util.h" #include "fd-util.h" #include "log.h" @@ -84,7 +85,9 @@ static void test_sleep(void) { log_info("/* %s */", __func__); - log_info("/= configuration =/"); + printf("Secure boot: %sd\n", enable_disable(is_efi_secure_boot())); + + log_info("/= individual sleep modes =/"); log_info("Standby configured: %s", yes_no(can_sleep_state(standby) > 0)); log_info("Suspend configured: %s", yes_no(can_sleep_state(mem) > 0)); log_info("Hibernate configured: %s", yes_no(can_sleep_state(disk) > 0)); @@ -94,7 +97,7 @@ static void test_sleep(void) { log_info("Hibernate+Shutdown configured: %s", yes_no(can_sleep_disk(shutdown) > 0)); log_info("Freeze configured: %s", yes_no(can_sleep_state(freeze) > 0)); - log_info("/= running system =/"); + log_info("/= high-level sleep verbs =/"); r = can_sleep("suspend"); log_info("Suspend configured and possible: %s", r >= 0 ? yes_no(r) : strerror_safe(r)); r = can_sleep("hibernate"); |