test: perform /usr/share/ sysext unmount lazily

/usr/share/ is a directory commonly accessed by various tools, hence we
really should make sure we umount it lazily (MNT_DETACH), since
otherwise there's a good chance that the umount might simply fail.

I noticed this there:

https://github.com/systemd/systemd/actions/runs/21321690161/job/61372465563?pr=40446
This commit is contained in:
Lennart Poettering
2026-01-25 20:49:14 +01:00
committed by Luca Boccassi
parent 802babf38c
commit 2e38c56c73

View File

@@ -1328,13 +1328,13 @@ test -f /usr/lib/systemd/system/some_file
mountpoint /usr/share
touch /tmp/foo/abc
test -f /usr/share/abc
umount /usr/share
umount -l /usr/share
test ! -f /usr/share/abc
mount --bind /tmp/foo /usr/share
systemd-sysext unmerge
test ! -f /usr/lib/systemd/system/some_file
mountpoint /usr/share
umount /usr/share
umount -l /usr/share
rm -f /var/lib/extensions/app0.raw
exit 0