diff --git a/tests/kola/boot/bootupd-validate b/tests/kola/boot/bootupd-validate index 4650dae37..5948f6296 100755 --- a/tests/kola/boot/bootupd-validate +++ b/tests/kola/boot/bootupd-validate @@ -84,7 +84,7 @@ validate() { # should remove this until https://issues.redhat.com/browse/RHEL-66584 is fixed set_selinux_permissve() { source /etc/os-release - if is_scos || ([ "${RHEL_VERSION}" == "9.6" ] && [ "${VARIANT_ID}" == "coreos" ] ); then + if is_scos || [ "$(get_rhel_ver)" = "9.6" ]; then semanage permissive -a bootupd_t fi } diff --git a/tests/kola/data/commonlib.sh b/tests/kola/data/commonlib.sh index f5efd93bd..40557bdfc 100644 --- a/tests/kola/data/commonlib.sh +++ b/tests/kola/data/commonlib.sh @@ -57,17 +57,22 @@ get_fedora_ver() { fi } -get_rhel_maj_ver() { +get_rhel_ver() { source /etc/os-release if [ "${ID}" == "rhcos" ]; then - echo "${RHEL_VERSION%%.*}" + echo "${RHEL_VERSION}" elif [ "${ID}" == "rhel" ]; then - echo "${VERSION_ID%%.*}" + echo "${VERSION_ID}" else fatal "Unknown ID $ID" fi } +get_rhel_maj_ver() { + local ver; ver=$(get_rhel_ver) + echo "${ver%%.*}" +} + # rhcos9 is_rhcos9() { source /etc/os-release