TEST-08: make sure / is remounted rw
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 8 May 2016 15:08:42 +0000 (11:08 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 9 May 2016 02:00:23 +0000 (22:00 -0400)
In this test /etc/fstab is replaced by -.mount unit. This causes
systemd-remount-fs.service to not remount / rw, which in turn causes various
failures becuase /var is not writable. In particular
systemd-tmpfiles-setup.service reports many failures. This is something
to possibly fix on its own (see https://github.com/systemd/systemd/issues/791);
in the meanwhile let's fix this test so that it doesn't fail, since the
point of the test is to check aliases on mount units, and not a ro root.

test/TEST-08-ISSUE-2730/test.sh

index 92e70b8..4091401 100755 (executable)
@@ -67,6 +67,20 @@ WantedBy=local-fs.target
 Alias=root.mount
 EOF
 
+    cat >$initdir/etc/systemd/system/systemd-remount-fs.service <<EOF
+[Unit]
+DefaultDependencies=no
+Conflicts=shutdown.target
+After=systemd-fsck-root.service
+Before=local-fs-pre.target local-fs.target shutdown.target
+Wants=local-fs-pre.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/bin/systemctl reload /
+EOF
+
         setup_testsuite
     ) || return 1