summaryrefslogtreecommitdiffstats
path: root/test/units/TEST-29-PORTABLE.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-16 18:18:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-16 18:18:34 +0000
commit67497cedb2f732b3445ecdc0d09b881f9c69f852 (patch)
treeb7197679acca419c7ddc0300873e19141d5fae3e /test/units/TEST-29-PORTABLE.sh
parentAdding debian version 256.1-2. (diff)
downloadsystemd-67497cedb2f732b3445ecdc0d09b881f9c69f852.tar.xz
systemd-67497cedb2f732b3445ecdc0d09b881f9c69f852.zip
Merging upstream version 256.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/units/TEST-29-PORTABLE.sh')
-rwxr-xr-xtest/units/TEST-29-PORTABLE.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/units/TEST-29-PORTABLE.sh b/test/units/TEST-29-PORTABLE.sh
index 27c24a0..b4dcd5a 100755
--- a/test/units/TEST-29-PORTABLE.sh
+++ b/test/units/TEST-29-PORTABLE.sh
@@ -354,6 +354,17 @@ portablectl detach --now --runtime --enable /tmp/rootdir minimal-app0
portablectl "${ARGS[@]}" attach --copy=symlink --now --runtime /tmp/rootdir minimal-app0
portablectl detach --now --runtime --enable /tmp/rootdir minimal-app0
+# The wrong file should be ignored, given the right one has the xattr set
+mkdir -p /tmp/wrongext/usr/lib/extension-release.d /tmp/wrongext/usr/lib/systemd/system/
+echo "[Service]" > /tmp/wrongext/usr/lib/systemd/system/app0.service
+touch /tmp/wrongext/usr/lib/extension-release.d/extension-release.wrongext_somethingwrong.txt
+cp /tmp/rootdir/usr/lib/os-release /tmp/wrongext/usr/lib/extension-release.d/extension-release.app0
+setfattr -n user.extension-release.strict -v "false" /tmp/wrongext/usr/lib/extension-release.d/extension-release.app0
+portablectl "${ARGS[@]}" attach --runtime --extension /tmp/wrongext /tmp/rootdir app0
+status="$(portablectl is-attached --extension wrongext rootdir)"
+[[ "${status}" == "attached-runtime" ]]
+portablectl detach --runtime --extension /tmp/wrongext /tmp/rootdir app0
+
umount /tmp/rootdir
umount /tmp/app0
umount /tmp/app1