Skip to content

Commit

Permalink
tests: Remount /boot and /boot/efi as rw
Browse files Browse the repository at this point in the history
In the future, FCOS' /boot and /boot/efi may be read-only.
Remount them as read-write before attempting to write to those
locations.
  • Loading branch information
kelvinfan001 committed Dec 1, 2020
1 parent 66e1bf1 commit 79d8563
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/kola/test-bootupd
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ function cleanup () {
fi
}

bootefidir=/boot/efi/EFI
bootmount=/boot
bootefimount=${bootmount}/efi
bootefidir=${bootefimount}/EFI
bootupdir=/usr/lib/bootupd/updates
efiupdir=${bootupdir}/EFI
ostbaseefi=/usr/lib/ostree-boot/efi/EFI
Expand Down Expand Up @@ -115,6 +117,9 @@ bootupctl update | tee out.txt
assert_file_has_content_literal out.txt 'No update available for any component'
assert_not_file_has_content_literal out.txt 'Updated EFI'

# Ensure /boot and /boot/efi can be written to
mount -o remount,rw ${bootmount}
mount -o remount,rw ${bootefimount}
echo "some additions" >> ${bootefidir}/${efisubdir}/shimx64.efi
if bootupctl validate 2>err.txt; then
fatal "unexpectedly passed validation"
Expand Down

0 comments on commit 79d8563

Please sign in to comment.