mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-13 12:58:20 +03:00
test: check for /dev/loop-control when checking lodev availability
losetup in util-linux 2.40 started reporting lost loop devices [0] and
it has an unfortunate side-effect where it reports lost devices even in
containers, which then makes the loop device check "falsely" pass [1].
Let's just check for /dev/loop-control explicitly to "work around" this.
[0] a6ca0456cc
[1] https://github.com/util-linux/util-linux/issues/2824
(cherry picked from commit 0348b500efea840b711903124b30174f97b9ae68)
(cherry picked from commit 5ab85d7f5d7f1d64563a74d4ad90f8a2ffea82a9)
(cherry picked from commit c960f9a3257d14b4eba240603dc2c918e7132168)
This commit is contained in:
parent
a57066fa39
commit
686eb93e2d
@ -12,6 +12,15 @@ if ! test -x "$SYSUPDATE"; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Loopback devices may not be supported. They are used because sfdisk cannot
|
||||
# change the sector size of a file, and we want to test both 512 and 4096 byte
|
||||
# sectors. If loopback devices are not supported, we can only test one sector
|
||||
# size, and the underlying device is likely to have a sector size of 512 bytes.
|
||||
if [[ ! -e /dev/loop-control ]]; then
|
||||
echo "No loopback device support"
|
||||
SECTOR_SIZES="512"
|
||||
fi
|
||||
|
||||
export SYSTEMD_PAGER=cat
|
||||
export SYSTEMD_LOG_LEVEL=debug
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user