Skip to content

Commit

Permalink
tests: adapt for composefs
Browse files Browse the repository at this point in the history
On composefs, / is now an overlay, so some of the commands that query
`/` don't quite work. Tweak them to instead query `/sysroot`, which
should still be the actual storage layer underneath the composefs mount
that we really care about for these tests.
  • Loading branch information
jlebon authored and travier committed Aug 30, 2024
1 parent e8625af commit 76f2b0d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/kola/root-reprovision/autosave-xfs/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fi
journalctl -u ignition-ostree-transposefs-autosave-xfs.service --grep=agcount
ok "autosaved XFS on large disk"

eval $(xfs_info / | grep -o 'agcount=[0-9]*')
eval $(xfs_info /sysroot | grep -o 'agcount=[0-9]*')
expected=4
if [ "$agcount" -gt "$expected" ]; then
fatal "expected agcount of at most ${expected}, got ${agcount}"
Expand Down
2 changes: 1 addition & 1 deletion tests/kola/root-reprovision/luks/autosave-xfs/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if [ -z "${AUTOPKGTEST_REBOOT_MARK:-}" ]; then
fi
ok "autosaved XFS on large disk"

eval $(xfs_info / | grep -o 'agcount=[0-9]*')
eval $(xfs_info /sysroot | grep -o 'agcount=[0-9]*')
expected=4
if [ "$agcount" -gt "${expected}" ]; then
fatal "expected agcount of at most ${expected}, got ${agcount}"
Expand Down
4 changes: 2 additions & 2 deletions tests/kola/root-reprovision/raid1/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ set -xeuo pipefail
# shellcheck disable=SC1091
. "$KOLA_EXT_DATA/commonlib.sh"

srcdev=$(findmnt -nvr / -o SOURCE)
srcdev=$(findmnt -nvr /sysroot -o SOURCE)
[[ ${srcdev} == $(realpath /dev/md/foobar) ]]

blktype=$(lsblk -o TYPE "${srcdev}" --noheadings)
[[ ${blktype} == raid1 ]]

fstype=$(findmnt -nvr / -o FSTYPE)
fstype=$(findmnt -nvr /sysroot -o FSTYPE)
[[ ${fstype} == xfs ]]
ok "source is XFS on RAID1 device"

Expand Down
2 changes: 1 addition & 1 deletion tests/kola/secex/ensure/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ grep -q bootfs.roothash /proc/cmdline
mount /dev/disk/by-label/se /sysroot/se
[[ -f /sysroot/se/sdboot ]]

check_luks /
check_luks /sysroot
check_luks /boot

0 comments on commit 76f2b0d

Please sign in to comment.