From efeb864cb547a2cbf96dc0053a8bdb4d9190b364 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 05:50:45 +0200 Subject: Merging upstream version 256. Signed-off-by: Daniel Baumann --- src/test/test-watch-pid.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/test/test-watch-pid.c') diff --git a/src/test/test-watch-pid.c b/src/test/test-watch-pid.c index b0c2c06..423a9be 100644 --- a/src/test/test-watch-pid.c +++ b/src/test/test-watch-pid.c @@ -18,7 +18,7 @@ int main(int argc, char *argv[]) { if (getuid() != 0) return log_tests_skipped("not root"); r = enter_cgroup_subroot(NULL); - if (r == -ENOMEDIUM) + if (r < 0) return log_tests_skipped("cgroupfs not available"); _cleanup_free_ char *unit_dir = NULL; @@ -54,7 +54,7 @@ int main(int argc, char *argv[]) { assert_se(pid >= 0); assert_se(hashmap_isempty(m->watch_pids)); - assert_se(manager_get_unit_by_pid(m, pid) == NULL); + ASSERT_NULL(manager_get_unit_by_pid(m, pid)); assert_se(unit_watch_pid(a, pid, false) >= 0); assert_se(manager_get_unit_by_pid(m, pid) == a); @@ -93,10 +93,10 @@ int main(int argc, char *argv[]) { assert_se(manager_get_unit_by_pid(m, pid) == c); unit_unwatch_pid(c, pid); - assert_se(manager_get_unit_by_pid(m, pid) == NULL); + ASSERT_NULL(manager_get_unit_by_pid(m, pid)); unit_unwatch_pid(c, pid); - assert_se(manager_get_unit_by_pid(m, pid) == NULL); + ASSERT_NULL(manager_get_unit_by_pid(m, pid)); return 0; } -- cgit v1.2.3