summaryrefslogtreecommitdiffstats
path: root/src/test/test-watch-pid.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:42 +0000
commit78e9bb837c258ac0ec7712b3d612cc2f407e731e (patch)
treef515d16b6efd858a9aeb5b0ef5d6f90bf288283d /src/test/test-watch-pid.c
parentAdding debian version 255.5-1. (diff)
downloadsystemd-78e9bb837c258ac0ec7712b3d612cc2f407e731e.tar.xz
systemd-78e9bb837c258ac0ec7712b3d612cc2f407e731e.zip
Merging upstream version 256.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/test-watch-pid.c')
-rw-r--r--src/test/test-watch-pid.c8
1 files changed, 4 insertions, 4 deletions
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;
}