]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/core/unit.c
Merge pull request #8765 from poettering/test-fixes
[thirdparty/systemd.git] / src / core / unit.c
index 09574da5ce1f19894a6a38220485e68e17d6d7bc..4c7e2cb8ae56b94ff37108e9ed5688958de05329 100644 (file)
@@ -5168,6 +5168,9 @@ void unit_export_state_files(Unit *u) {
         if (!MANAGER_IS_SYSTEM(u->manager))
                 return;
 
+        if (u->manager->test_run_flags != 0)
+                return;
+
         /* Exports a couple of unit properties to /run/systemd/units/, so that journald can quickly query this data
          * from there. Ideally, journald would use IPC to query this, like everybody else, but that's hard, as long as
          * the IPC system itself and PID 1 also log to the journal.