Skip to content

Commit

Permalink
tests/kola: add new test to verify composefs is on
Browse files Browse the repository at this point in the history
  • Loading branch information
nikita-dubrovskii authored and dustymabe committed Jan 21, 2025
1 parent d483144 commit 0c68b95
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/kola/composefs/data/commonlib.sh
29 changes: 29 additions & 0 deletions tests/kola/composefs/enabled
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
## kola:
## # We now have composefs turned on in CoreOS.
## description: Verify that composefs is on.

set -euo pipefail

# shellcheck disable=SC1091
. "$KOLA_EXT_DATA/commonlib.sh"

# RHCOS/SCOS based on 9.4 doesn't use composefs, but legacy sysroot.readonly flag
if ! is_fcos && [[ "$(get_rhel_ver)" = "9.4" ]]; then
echo "skipping 9.4"
exit 0
fi

features=$(ostree --version)
if ! [[ "${features}" =~ "composefs" ]]; then
fatal "Error: ostree has no composefs support: ${features}"
fi

rootfs=$(findmnt -n -o FSTYPE /)
if [ "${rootfs}" != "overlay" ]; then
fatal "Error: Expected overlay on /, found: ${rootfs}"
fi

journalctl -u ostree-prepare-root.service | grep -q "composefs: mounted successfully"

ok "composefs is on"

0 comments on commit 0c68b95

Please sign in to comment.