Skip to content

Commit

Permalink
bootupd-validate: skip adopt test on ppc64le with older bootupd
Browse files Browse the repository at this point in the history
  • Loading branch information
HuijingHei committed Dec 11, 2024
1 parent e97a55b commit c564505
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions tests/kola/boot/bootupd-validate
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -73,15 +79,17 @@ 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"
;;
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
Expand Down

0 comments on commit c564505

Please sign in to comment.