diff --git a/test/cases/cross-distro.sh b/test/cases/cross-distro.sh index 3bf2894de..72ad1a533 100755 --- a/test/cases/cross-distro.sh +++ b/test/cases/cross-distro.sh @@ -108,7 +108,12 @@ fi # Filter out beta and centos-stream, see GH issue #2257 ALL_DISTROS=$(find "$REPO_PATH" -name '*.json' -printf '%P\n' | awk -F "." '{ print $1 }') ALL_EXPECTED_DISTROS=$(echo "$ALL_DISTROS" | grep -E "$PATTERN" | grep -Ev 'beta|stream' | sort) -ALL_REMAINDERS=$(echo "$ALL_DISTROS" | grep -v "$RECOGNIZED_DISTROS") +# Warning: filter out the remaining distros by matching whole words to avoid matching +# the value rhel-93 by the pattern rhel-9! +# If we're running on a RHEL 9.2 osbuild-composer doesn't know anything about 9.3 +# images so the value rhel-9.3 should be treated as unrecognized and error out as +# expected in the test snippet further below +ALL_REMAINDERS=$(echo "$ALL_DISTROS" | grep -vw "$RECOGNIZED_DISTROS") # Check for any missing distros based on the expected host pattern if [ "$ALL_EXPECTED_DISTROS" != "$INSTALLED_DISTROS" ];then