From: Mike Yuan Date: Fri, 26 Apr 2024 09:03:45 +0000 (+0800) Subject: TEST-50-DISSECT: add explicit coverage for BindJournalSockets= X-Git-Tag: v257-rc1~562^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F32487%2Fhead;p=thirdparty%2Fsystemd.git TEST-50-DISSECT: add explicit coverage for BindJournalSockets= --- diff --git a/test/test-functions b/test/test-functions index 33e41a1aaa5..64a664b69ef 100644 --- a/test/test-functions +++ b/test/test-functions @@ -731,7 +731,9 @@ install_verity_minimal() { cat echo grep + ls mount + mountpoint sleep touch ) diff --git a/test/units/TEST-50-DISSECT.dissect.sh b/test/units/TEST-50-DISSECT.dissect.sh index 53ff198d166..5e4899788f9 100755 --- a/test/units/TEST-50-DISSECT.dissect.sh +++ b/test/units/TEST-50-DISSECT.dissect.sh @@ -74,6 +74,11 @@ fi systemd-dissect --umount "$IMAGE_DIR/mount" systemd-dissect --umount "$IMAGE_DIR/mount2" +# Test BindJournalSockets= +systemd-run --wait -p RootImage="$MINIMAL_IMAGE.raw" mountpoint /run/systemd/journal/socket +(! systemd-run --wait -p RootImage="$MINIMAL_IMAGE.raw" -p BindJournalSockets=no ls /run/systemd/journal/socket) +(! systemd-run --wait -p RootImage="$MINIMAL_IMAGE.raw" -p MountAPIVFS=no ls /run/systemd/journal/socket) + systemd-run -P -p RootImage="$MINIMAL_IMAGE.raw" cat /usr/lib/os-release | grep -q -F "MARKER=1" mv "$MINIMAL_IMAGE.verity" "$MINIMAL_IMAGE.fooverity" mv "$MINIMAL_IMAGE.roothash" "$MINIMAL_IMAGE.foohash" @@ -81,6 +86,7 @@ systemd-run -P \ -p RootImage="$MINIMAL_IMAGE.raw" \ -p RootHash="$MINIMAL_IMAGE.foohash" \ -p RootVerity="$MINIMAL_IMAGE.fooverity" \ + -p BindJournalSockets=yes \ cat /usr/lib/os-release | grep -q -F "MARKER=1" # Let's use the long option name just here as a test systemd-run -P \