]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/test/test-sched-prio.c
tests: override XDG_RUNTIME_DIR where we use the user runtime dir
[thirdparty/systemd.git] / src / test / test-sched-prio.c
index 5083cd53c238680df705a33145bb84860878971b..3e9caafc710dd143fea8e50f0a9637c48c32f5b6 100644 (file)
 
 #include "macro.h"
 #include "manager.h"
+#include "rm-rf.h"
 #include "test-helper.h"
+#include "tests.h"
 
 int main(int argc, char *argv[]) {
+        _cleanup_(rm_rf_and_freep) char *runtime_dir = NULL;
         Manager *m = NULL;
         Unit *idle_ok, *idle_bad, *rr_ok, *rr_bad, *rr_sched;
         Service *ser;
@@ -31,6 +34,8 @@ int main(int argc, char *argv[]) {
         FDSet *fdset = NULL;
         int r;
 
+        assert_se(runtime_dir = setup_fake_runtime_dir());
+
         /* prepare the test */
         assert_se(set_unit_path(TEST_DIR) >= 0);
         r = manager_new(UNIT_FILE_USER, true, &m);