mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
test: use mksquashfs -noappend
Makes the setup idempotent, as mksquashfs by default attempts to
append to an existing image
(cherry picked from commit 392d46d7a8
)
This commit is contained in:
parent
7784d3dde0
commit
44c4116557
@ -606,7 +606,7 @@ ExecStart=sleep 120
|
||||
EOF
|
||||
cp "$initdir/usr/lib/systemd/system/minimal-app0.service" "$initdir/usr/lib/systemd/system/minimal-app0-foo.service"
|
||||
|
||||
mksquashfs "$initdir" "$oldinitdir/usr/share/minimal_0.raw"
|
||||
mksquashfs "$initdir" "$oldinitdir/usr/share/minimal_0.raw" -noappend
|
||||
veritysetup format "$oldinitdir/usr/share/minimal_0.raw" "$oldinitdir/usr/share/minimal_0.verity" | \
|
||||
grep '^Root hash:' | cut -f2 | tr -d '\n' >"$oldinitdir/usr/share/minimal_0.roothash"
|
||||
|
||||
@ -614,7 +614,7 @@ EOF
|
||||
rm "$initdir/usr/lib/systemd/system/minimal-app0-foo.service"
|
||||
cp "$initdir/usr/lib/systemd/system/minimal-app0.service" "$initdir/usr/lib/systemd/system/minimal-app0-bar.service"
|
||||
|
||||
mksquashfs "$initdir" "$oldinitdir/usr/share/minimal_1.raw"
|
||||
mksquashfs "$initdir" "$oldinitdir/usr/share/minimal_1.raw" -noappend
|
||||
veritysetup format "$oldinitdir/usr/share/minimal_1.raw" "$oldinitdir/usr/share/minimal_1.verity" | \
|
||||
grep '^Root hash:' | cut -f2 | tr -d '\n' >"$oldinitdir/usr/share/minimal_1.roothash"
|
||||
|
||||
@ -642,7 +642,7 @@ cat /usr/lib/extension-release.d/extension-release.app0
|
||||
EOF
|
||||
chmod +x "$initdir/opt/script0.sh"
|
||||
echo MARKER=1 >"$initdir/usr/lib/systemd/system/some_file"
|
||||
mksquashfs "$initdir" "$oldinitdir/usr/share/app0.raw"
|
||||
mksquashfs "$initdir" "$oldinitdir/usr/share/app0.raw" -noappend
|
||||
|
||||
export initdir="$TESTDIR/app1"
|
||||
mkdir -p "$initdir/usr/lib/extension-release.d" "$initdir/usr/lib/systemd/system" "$initdir/opt"
|
||||
@ -665,7 +665,7 @@ cat /usr/lib/extension-release.d/extension-release.app2
|
||||
EOF
|
||||
chmod +x "$initdir/opt/script1.sh"
|
||||
echo MARKER=1 >"$initdir/usr/lib/systemd/system/other_file"
|
||||
mksquashfs "$initdir" "$oldinitdir/usr/share/app1.raw"
|
||||
mksquashfs "$initdir" "$oldinitdir/usr/share/app1.raw" -noappend
|
||||
)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user