Skip to content

Commit

Permalink
tests/storage-vm: get checksum of mounted EFI partition
Browse files Browse the repository at this point in the history
Sometimes, `umount`'ing `/boot/efi` on `v2` wouldn't work causing the
comparison to fail as it would compare the checksum with `v1`'s umounted
`/boot/efi`.

Simplify this by always checking that part while mounted.

Signed-off-by: Simon Deziel <[email protected]>
  • Loading branch information
simondeziel committed Sep 24, 2024
1 parent 6a893e1 commit 45b028f
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions tests/storage-vm
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,6 @@ for poolDriver in $poolDriverList; do
fi
V1_ROOT_GPT_DISK_ID="$(lxc exec v1 -- fdisk --list /dev/sda | awk '/^Disk identifier:/ {print $3}')"
V1_EFI_PART="$(lxc exec v1 -- fdisk --list /dev/sda | awk '/EFI System$/ {print $1}')"
lxc exec v1 -- umount "${V1_EFI_PART}"
V1_EFI_SHA256SUM="$(lxc exec v1 -- sha256sum "${V1_EFI_PART}")"

echo "==> Deactivate cloud-init after initial boot to avoid rootfs resize/growpart"
Expand Down Expand Up @@ -472,7 +471,6 @@ for poolDriver in $poolDriverList; do

echo "==> Check the EFI partition number and content did not change after the volume size override"
V2_EFI_PART="$(lxc exec v2 -- fdisk --list /dev/sda | awk '/EFI System$/ {print $1}')"
lxc exec v2 -- umount "${V2_EFI_PART}"
V2_EFI_SHA256SUM="$(lxc exec v2 -- sha256sum "${V2_EFI_PART}")"
[ "${V1_EFI_SHA256SUM}" = "${V2_EFI_SHA256SUM}" ]

Expand Down Expand Up @@ -539,7 +537,6 @@ for poolDriver in $poolDriverList; do

echo "==> Check the EFI partition number and content did not change after the volume size override"
V2_EFI_PART="$(lxc exec v2 -- fdisk --list /dev/sda | awk '/EFI System$/ {print $1}')"
lxc exec v2 -- umount "${V2_EFI_PART}"
V2_EFI_SHA256SUM="$(lxc exec v2 -- sha256sum "${V2_EFI_PART}")"
[ "${V1_EFI_SHA256SUM}" = "${V2_EFI_SHA256SUM}" ]

Expand Down

0 comments on commit 45b028f

Please sign in to comment.