Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ rm -rf /var/log
rm -rf /var/lib
rm -rf /var/cache
rm -rf /run/rhsm
rm -rf /tmp/*
EORUN
# Remove /var/roothome as workaround
RUN <<EORUN
Expand Down
15 changes: 8 additions & 7 deletions tests/e2e-update/e2e-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ bootupd_git=$(cd ${dn} && git rev-parse --show-toplevel)
testtmp=$(mktemp -d -p /var/tmp bootupd-e2e.XXXXXXX)
export test_tmpdir=${testtmp}

# This is new content for our update
test_bootupd_payload_file=/boot/efi/EFI/fedora/test-bootupd.efi
test_bootupd_payload_file1=/boot/efi/EFI/BOOT/test-bootupd1.efi
# This is new content for our update; the path must match the
# usr/lib/efi/<name>/<version>/EFI layout used by F44+ images.
test_bootupd_payload_file=/usr/lib/efi/test_bootupd_payload/1.0/EFI/fedora/test-bootupd.efi
test_bootupd_payload_file1=/usr/lib/efi/test_bootupd_payload/1.0/EFI/BOOT/test-bootupd1.efi
build_rpm test_bootupd_payload \
files "${test_bootupd_payload_file}
${test_bootupd_payload_file1}" \
Expand All @@ -51,8 +52,8 @@ add_override() {
if test -z "${e2e_skip_build:-}"; then
echo "Building starting image"
rm -f ${overrides}/rpm/*.rpm
# Version from F43 prior to GA
add_override grub2-2.12-38.fc43
# Version from F44 prior to GA
add_override grub2-2.12-56.fc44
runv cosa build
runv cosa osbuild qemu
prev_image=$(runv cosa meta --image-path qemu)
Expand All @@ -61,8 +62,8 @@ if test -z "${e2e_skip_build:-}"; then
echo "packages: [test_bootupd_payload]" >> src/config/manifest.yaml
rm -f ${overrides}/rpm/*.rpm
echo "Building update ostree"
# Latest (current) version in F43
add_override grub2-2.12-40.fc43
# Latest (current) version in F44
add_override grub2-2.12-58.fc44
mv ${test_tmpdir}/yumrepo/packages/$(arch)/*.rpm ${overrides}/rpm/
# Only build ostree update
runv cosa build ostree
Expand Down
18 changes: 11 additions & 7 deletions tests/kola/test-bootupd
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ usrlibefi=/usr/lib/efi
# Path to <tmp_efi_mount>/EFI/fedora
tmpefisubdir=${tmpefidir}/${efisubdir}

if [ -d efilib ]; then efilib_exists=true; else efilib_exists=false; fi
if [ -d ${usrlibefi} ]; then efilib_exists=true; else efilib_exists=false; fi

prepare_efi_update() {
test -w /usr
Expand Down Expand Up @@ -179,13 +179,17 @@ mount -o remount,rw /boot
rm -f /boot/bootupd-state.json

if [ -d /sys/firmware/efi ]; then
# EFI boot: verify update failed if metadata is missing EFI.json
# Backup EFI.json and restore it later, or validate will fail
update_metadata_move EFI EFI-bak
if bootupctl update 2>err.txt; then
fatal "Should fail as missing EFI update metadata (booted with EFI)"
# EFI boot: verify update failed if metadata is missing EFI.json.
# Skip this check when using /usr/lib/efi, as metadata is derived from
# the directory structure so removing EFI.json does not cause a failure.
if ! $efilib_exists; then
# Backup EFI.json and restore it later, or validate will fail
update_metadata_move EFI EFI-bak
if bootupctl update 2>err.txt; then
fatal "Should fail as missing EFI update metadata (booted with EFI)"
fi
update_metadata_move EFI-bak EFI
fi
update_metadata_move EFI-bak EFI

# Should succeed if BIOS metadata is missing
rm -f ${bootupdir}/BIOS.json
Expand Down
Loading