Skip to content

Commit

Permalink
TEST-50-DISSECT: add explicit coverage for BindJournalSockets=
Browse files Browse the repository at this point in the history
  • Loading branch information
YHNdnzj committed May 13, 2024
1 parent 5671666 commit 50a8171
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/test-functions
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,9 @@ install_verity_minimal() {
cat
echo
grep
ls
mount
mountpoint
sleep
touch
)
Expand Down
6 changes: 6 additions & 0 deletions test/units/testsuite-50.dissect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,19 @@ 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"
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 \
Expand Down

0 comments on commit 50a8171

Please sign in to comment.