Skip to content

Commit 1137038

Browse files
test/tmt: Use bootc usroverlay for /usr overlay mount
Previously we were mounting a rw overlay on top of /usr using `mount -t overlay -olowerdir=/usr,workdir=...,upperdir=... overlay /usr` which caused the kernel to throw `overlayfs: maximum fs stacking depth exceeded` possibly because the mountpoint was the same as the lowerdir Also, move the overlay mount BEFORE we mask off `/sysroot/ostree` else bootc throws `error: Read only filesystem` Signed-off-by: Pragyan Poudyal <[email protected]>
1 parent 1a61162 commit 1137038

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

tmt/tests/booted/test-install-outside-container.nu

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ umount /var/mnt
3030
setenforce 0
3131
systemd-run -p MountFlags=slave -qdPG -- /bin/sh -c $"
3232
set -xeuo pipefail
33+
bootc usr-overlay
3334
if test -d /sysroot/ostree; then mount --bind /usr/share/empty /sysroot/ostree; fi
34-
mkdir -p /tmp/ovl/{upper,work}
35-
mount -t overlay -olowerdir=/usr,workdir=/tmp/ovl/work,upperdir=/tmp/ovl/upper overlay /usr
3635
# Note we do keep the other bootupd state
3736
rm -vrf /usr/lib/bootupd/updates
3837
# Another bootc install bug, we should not look at this in outside-of-container flows

tmt/tests/booted/test-install-unified-flag.nu

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@ def main [] {
2929
# We use systemd-run to handle mount namespace issues
3030
systemd-run -p MountFlags=slave -qdPG -- /bin/sh -c $"
3131
set -xeuo pipefail
32+
bootc usr-overlay
3233
if test -d /sysroot/ostree; then mount --bind /usr/share/empty /sysroot/ostree; fi
33-
mkdir -p /tmp/ovl/{upper,work}
34-
mount -t overlay -olowerdir=/usr,workdir=/tmp/ovl/work,upperdir=/tmp/ovl/upper overlay /usr
3534
# Note we do keep the other bootupd state
3635
rm -vrf /usr/lib/bootupd/updates
3736
# Another bootc install bug, we should not look at this in outside-of-container flows

0 commit comments

Comments
 (0)