mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
test: add a brief comment for the chattr check
Addresses: https://github.com/systemd/systemd/pull/32907#discussion_r1605919598
This commit is contained in:
@@ -132,6 +132,9 @@ machinectl show-image clone1
|
||||
machinectl rename clone1 clone2
|
||||
(! machinectl show-image clone1)
|
||||
machinectl show-image clone2
|
||||
# `machinectl read-only` uses chattr (ioctl(FS_IOC_SETFLAGS)) when the container is backed by a directory,
|
||||
# and this operation might not be implemented on certain filesystems (i.e. tmpfs on older kernels), so check
|
||||
# if we have chattr support before running following tests
|
||||
if lsattr -d /var/lib/machines >/dev/null; then
|
||||
[[ "$(machinectl show-image --property=ReadOnly --value clone2)" == no ]]
|
||||
machinectl read-only clone2 yes
|
||||
|
||||
Reference in New Issue
Block a user