]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/journal/test-journal-init.c
test-journal: move tests to /var/tmp/ and set FS_NOCOW_FL
[thirdparty/systemd.git] / src / journal / test-journal-init.c
index 860baca38388e0b0e50cda82b3e2b63d62331dcd..d10e61080d23051b1a7c8409ab089bfb513d234a 100644 (file)
@@ -2,6 +2,7 @@
 
 #include "sd-journal.h"
 
+#include "chattr-util.h"
 #include "log.h"
 #include "parse-util.h"
 #include "rm-rf.h"
@@ -11,7 +12,7 @@
 int main(int argc, char *argv[]) {
         sd_journal *j;
         int r, i, I = 100;
-        char t[] = "/tmp/journal-stream-XXXXXX";
+        char t[] = "/var/tmp/journal-stream-XXXXXX";
 
         test_setup_logging(LOG_DEBUG);
 
@@ -24,6 +25,7 @@ int main(int argc, char *argv[]) {
         log_info("Running %d loops", I);
 
         assert_se(mkdtemp(t));
+        (void) chattr_path(t, FS_NOCOW_FL, FS_NOCOW_FL, NULL);
 
         for (i = 0; i < I; i++) {
                 r = sd_journal_open(&j, SD_JOURNAL_LOCAL_ONLY);