diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:40 +0000 |
commit | fc53809803cd2bc2434e312b19a18fa36776da12 (patch) | |
tree | b4b43bd6538f51965ce32856e9c053d0f90919c8 /src/test/test-unit-file.c | |
parent | Adding upstream version 255.5. (diff) | |
download | systemd-fc53809803cd2bc2434e312b19a18fa36776da12.tar.xz systemd-fc53809803cd2bc2434e312b19a18fa36776da12.zip |
Adding upstream version 256.upstream/256
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/test-unit-file.c')
-rw-r--r-- | src/test/test-unit-file.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/test/test-unit-file.c b/src/test/test-unit-file.c index 9f8787b..63e5000 100644 --- a/src/test/test-unit-file.c +++ b/src/test/test-unit-file.c @@ -26,7 +26,7 @@ TEST(unit_validate_alias_symlink_and_warn) { } TEST(unit_file_build_name_map) { - _cleanup_(lookup_paths_free) LookupPaths lp = {}; + _cleanup_(lookup_paths_done) LookupPaths lp = {}; _cleanup_hashmap_free_ Hashmap *unit_ids = NULL; _cleanup_hashmap_free_ Hashmap *unit_names = NULL; const char *k, *dst; @@ -88,18 +88,18 @@ TEST(unit_file_build_name_map) { TEST(runlevel_to_target) { in_initrd_force(false); - assert_se(streq_ptr(runlevel_to_target(NULL), NULL)); - assert_se(streq_ptr(runlevel_to_target("unknown-runlevel"), NULL)); - assert_se(streq_ptr(runlevel_to_target("rd.unknown-runlevel"), NULL)); - assert_se(streq_ptr(runlevel_to_target("3"), SPECIAL_MULTI_USER_TARGET)); - assert_se(streq_ptr(runlevel_to_target("rd.rescue"), NULL)); + ASSERT_STREQ(runlevel_to_target(NULL), NULL); + ASSERT_STREQ(runlevel_to_target("unknown-runlevel"), NULL); + ASSERT_STREQ(runlevel_to_target("rd.unknown-runlevel"), NULL); + ASSERT_STREQ(runlevel_to_target("3"), SPECIAL_MULTI_USER_TARGET); + ASSERT_STREQ(runlevel_to_target("rd.rescue"), NULL); in_initrd_force(true); - assert_se(streq_ptr(runlevel_to_target(NULL), NULL)); - assert_se(streq_ptr(runlevel_to_target("unknown-runlevel"), NULL)); - assert_se(streq_ptr(runlevel_to_target("rd.unknown-runlevel"), NULL)); - assert_se(streq_ptr(runlevel_to_target("3"), NULL)); - assert_se(streq_ptr(runlevel_to_target("rd.rescue"), SPECIAL_RESCUE_TARGET)); + ASSERT_STREQ(runlevel_to_target(NULL), NULL); + ASSERT_STREQ(runlevel_to_target("unknown-runlevel"), NULL); + ASSERT_STREQ(runlevel_to_target("rd.unknown-runlevel"), NULL); + ASSERT_STREQ(runlevel_to_target("3"), NULL); + ASSERT_STREQ(runlevel_to_target("rd.rescue"), SPECIAL_RESCUE_TARGET); } static int intro(void) { |