]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
TEST-50-DISSECT: add explicit coverage for BindJournalSockets= 32487/head
authorMike Yuan <me@yhndnzj.com>
Fri, 26 Apr 2024 09:03:45 +0000 (17:03 +0800)
committerMike Yuan <me@yhndnzj.com>
Tue, 3 Sep 2024 19:04:52 +0000 (21:04 +0200)
test/test-functions
test/units/TEST-50-DISSECT.dissect.sh

index 33e41a1aaa5a3779b990ed2d1ee01ef6a6215988..64a664b69efaa898d62e2852d5abe7d97a6e6def 100644 (file)
@@ -731,7 +731,9 @@ install_verity_minimal() {
             cat
             echo
             grep
+            ls
             mount
+            mountpoint
             sleep
             touch
         )
index 53ff198d1665e67456789ea900b0542e76851e1a..5e4899788f930584fa89a71650a8f11b477cdb93 100755 (executable)
@@ -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 \