From 45b028f85b28b2e185168e3d8caf0d01b6f19923 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Tue, 24 Sep 2024 16:00:43 -0400 Subject: [PATCH] tests/storage-vm: get checksum of mounted EFI partition 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 --- tests/storage-vm | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/storage-vm b/tests/storage-vm index 5a2de100..344e143a 100755 --- a/tests/storage-vm +++ b/tests/storage-vm @@ -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" @@ -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}" ] @@ -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}" ]