]> 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>
Mon, 26 Jan 2026 11:49:37 +0000 (11:49 +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

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

index 866e932f16c73f637f89e3d8c64d16f14ad145b6..26bec15351b3e8f25176439d249745f88d226f5f 100755 (executable)
@@ -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