From c56450501d5bb0bf85312c99b9551348e01dd827 Mon Sep 17 00:00:00 2001 From: HuijingHei Date: Wed, 11 Dec 2024 14:15:41 +0800 Subject: [PATCH] bootupd-validate: skip adopt test on ppc64le with older bootupd Fixes https://github.com/openshift/os/issues/1687 --- tests/kola/boot/bootupd-validate | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/tests/kola/boot/bootupd-validate b/tests/kola/boot/bootupd-validate index 5948f6296..e33060240 100755 --- a/tests/kola/boot/bootupd-validate +++ b/tests/kola/boot/bootupd-validate @@ -46,15 +46,21 @@ overwrite_file() { } adopt_and_update() { - local state_file="/boot/bootupd-state.json" - if [ -f "${state_file}" ]; then - mount -o remount,rw /boot - rm -f ${state_file} - bootupctl adopt-and-update | grep "Adopted and updated.*" - [ ! -f "${state_file}" ] && fatal "Should find ${state_file}" - mount -o remount,ro /boot + # skip adopt on ppc64le if using bootupd version older than '0.2.22' + # (which includes bios adopt) + if [ $(arch) == "ppc64le" ] && ! vergte "${bootupd_version}" "${required_version}"; then + echo "skipped adopt_and_update on ppc64le" else - fatal "could not find ${state_file}" + local state_file="/boot/bootupd-state.json" + if [ -f "${state_file}" ]; then + mount -o remount,rw /boot + rm -f ${state_file} + bootupctl adopt-and-update | grep "Adopted and updated.*" + [ ! -f "${state_file}" ] && fatal "Should find ${state_file}" + mount -o remount,ro /boot + else + fatal "could not find ${state_file}" + fi fi } @@ -73,7 +79,9 @@ validate() { bootupctl validate | grep "${msg_efi}" ;; ppc64le) - bootupctl validate | grep "${msg_bios}" + if vergte "${bootupd_version}" "${required_version}"; then + bootupctl validate | grep "${msg_bios}" + fi ;; *) echo "skipped validate" @@ -81,7 +89,7 @@ validate() { esac } -# should remove this until https://issues.redhat.com/browse/RHEL-66584 is fixed +# should remove this until https://issues.redhat.com/browse/RHEL-70849 is fixed set_selinux_permissve() { source /etc/os-release if is_scos || [ "$(get_rhel_ver)" = "9.6" ]; then