]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/test/test-path-lookup.c
util: rework rm_rf() logic
[thirdparty/systemd.git] / src / test / test-path-lookup.c
index a951b01b9753764c91d0e21826dd833893947581..66b0b99741ba5427e70d5ad4e4573dc97c95e885 100644 (file)
@@ -24,6 +24,7 @@
 #include "path-lookup.h"
 #include "log.h"
 #include "strv.h"
+#include "rm-rf.h"
 
 static void test_paths(SystemdRunningAs running_as, bool personal) {
         char template[] = "/tmp/test-path-lookup.XXXXXXX";
@@ -42,7 +43,7 @@ static void test_paths(SystemdRunningAs running_as, bool personal) {
         assert_se(strv_contains(lp.unit_path, exists));
         assert_se(strv_contains(lp.unit_path, not));
 
-        assert_se(rm_rf_dangerous(template, false, true, false) >= 0);
+        assert_se(rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL) >= 0);
 }
 
 static void print_generator_paths(SystemdRunningAs running_as) {