]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: perform /usr/share/ sysext unmount lazily
authorLennart Poettering <lennart@poettering.net>
Sun, 25 Jan 2026 19:49:14 +0000 (20:49 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 27 Feb 2026 20:05:57 +0000 (20:05 +0000)
/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
(cherry picked from commit 2e38c56c73b06e4e031535ad2dccbb6d065fbadd)
(cherry picked from commit b6b0c83b8d1602925ab918e4ae1c4245a2a4c128)
(cherry picked from commit a88ff44c4405db05fec6f2e0364ff9952007599d)

test/units/TEST-50-DISSECT.sysext.sh

index 2fa2951b61275b3389017a58c7a8a0896491cbd0..ef17e5a380e9bb6ecac3c56da2d1742278cadb31 100755 (executable)
@@ -1102,13 +1102,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