mirror of
https://github.com/systemd/systemd.git
synced 2025-01-05 13:18:06 +03:00
test: add more coverage for extensions and verity
(cherry picked from commitc7fcb08324
) (cherry picked from commit06467e1dbc
)
This commit is contained in:
parent
4cc7809d01
commit
04065a0330
@ -389,6 +389,12 @@ systemd-run -P \
|
|||||||
--property RootImage="$MINIMAL_IMAGE.raw" \
|
--property RootImage="$MINIMAL_IMAGE.raw" \
|
||||||
"${BIND_LOG_SOCKETS[@]}" \
|
"${BIND_LOG_SOCKETS[@]}" \
|
||||||
cat /etc/systemd/system/some_file | grep -q -F "MARKER_CONFEXT_123"
|
cat /etc/systemd/system/some_file | grep -q -F "MARKER_CONFEXT_123"
|
||||||
|
systemd-run -P \
|
||||||
|
--property ExtensionImages="/tmp/app0.raw /tmp/conf0.raw" \
|
||||||
|
veritysetup status "$(cat /tmp/app0.roothash)-verity" | grep -q "$(cat /tmp/app0.roothash)"
|
||||||
|
systemd-run -P \
|
||||||
|
--property ExtensionImages="/tmp/app0.raw /tmp/conf0.raw" \
|
||||||
|
veritysetup status "$(cat /tmp/conf0.roothash)-verity" | grep -q "$(cat /tmp/conf0.roothash)"
|
||||||
# Check that using a symlink to NAME-VERSION.raw works as long as the symlink has the correct name NAME.raw
|
# Check that using a symlink to NAME-VERSION.raw works as long as the symlink has the correct name NAME.raw
|
||||||
mkdir -p /tmp/symlink-test/
|
mkdir -p /tmp/symlink-test/
|
||||||
cp /tmp/app-nodistro.raw /tmp/symlink-test/app-nodistro-v1.raw
|
cp /tmp/app-nodistro.raw /tmp/symlink-test/app-nodistro-v1.raw
|
||||||
|
@ -275,6 +275,7 @@ EOF
|
|||||||
chmod +x "$initdir/opt/script0.sh"
|
chmod +x "$initdir/opt/script0.sh"
|
||||||
echo MARKER=1 >"$initdir/usr/lib/systemd/system/some_file"
|
echo MARKER=1 >"$initdir/usr/lib/systemd/system/some_file"
|
||||||
mksquashfs "$initdir" /tmp/app0.raw -noappend
|
mksquashfs "$initdir" /tmp/app0.raw -noappend
|
||||||
|
veritysetup format /tmp/app0.raw /tmp/app0.verity --root-hash-file /tmp/app0.roothash
|
||||||
|
|
||||||
initdir="/var/tmp/conf0"
|
initdir="/var/tmp/conf0"
|
||||||
mkdir -p "$initdir/etc/extension-release.d" "$initdir/etc/systemd/system" "$initdir/opt"
|
mkdir -p "$initdir/etc/extension-release.d" "$initdir/etc/systemd/system" "$initdir/opt"
|
||||||
@ -286,6 +287,7 @@ EOF
|
|||||||
) >>"$initdir/etc/extension-release.d/extension-release.conf0"
|
) >>"$initdir/etc/extension-release.d/extension-release.conf0"
|
||||||
echo MARKER_1 >"$initdir/etc/systemd/system/some_file"
|
echo MARKER_1 >"$initdir/etc/systemd/system/some_file"
|
||||||
mksquashfs "$initdir" /tmp/conf0.raw -noappend
|
mksquashfs "$initdir" /tmp/conf0.raw -noappend
|
||||||
|
veritysetup format /tmp/conf0.raw /tmp/conf0.verity --root-hash-file /tmp/conf0.roothash
|
||||||
|
|
||||||
initdir="/var/tmp/app1"
|
initdir="/var/tmp/app1"
|
||||||
mkdir -p "$initdir/usr/lib/extension-release.d" "$initdir/usr/lib/systemd/system" "$initdir/opt"
|
mkdir -p "$initdir/usr/lib/extension-release.d" "$initdir/usr/lib/systemd/system" "$initdir/opt"
|
||||||
|
Loading…
Reference in New Issue
Block a user