diff options
author | Zach Smith <z@zxmth.us> | 2019-05-20 07:43:29 +0200 |
---|---|---|
committer | Zach Smith <z@zxmth.us> | 2019-05-30 15:06:16 +0200 |
commit | 28ca9c249983cded04a3eb755c1950251c3c3b27 (patch) | |
tree | 17f6d64be4cc141957387522c1a9392de6100fff /src/test/test-sleep.c | |
parent | systemd-sleep: replace rtc wakealarm with CLOCK_BOOTTIME_ALARM s2h (diff) | |
download | systemd-28ca9c249983cded04a3eb755c1950251c3c3b27.tar.xz systemd-28ca9c249983cded04a3eb755c1950251c3c3b27.zip |
systemd-sleep: refactor sleep config parsing
remove verb from parse
refactor required fields checks
refactor allow settings
Diffstat (limited to 'src/test/test-sleep.c')
-rw-r--r-- | src/test/test-sleep.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/test/test-sleep.c b/src/test/test-sleep.c index 7e949154b1..a0830bc899 100644 --- a/src/test/test-sleep.c +++ b/src/test/test-sleep.c @@ -16,12 +16,10 @@ #include "util.h" static void test_parse_sleep_config(void) { - const char *verb; - + _cleanup_(free_sleep_configp) SleepConfig *sleep_config = NULL; log_info("/* %s */", __func__); - FOREACH_STRING(verb, "suspend", "hibernate", "hybrid-sleep", "suspend-then-hibernate") - assert_se(parse_sleep_config(verb, NULL, NULL, NULL, NULL) == 0); + assert(parse_sleep_config(&sleep_config) == 0); } static int test_fiemap(const char *path) { |