From 911bf5a728736afdea9381f5c1a2f56a1fd76dd1 Mon Sep 17 00:00:00 2001 From: Katie May <63071677+maykathm@users.noreply.github.com> Date: Tue, 14 Jan 2025 17:44:29 +0100 Subject: [PATCH] tests: remove check for bootx64.efi in boot in uc-update-assets-secure-add-sbat (#14877) * tests: added condition that only checks grubx64.efi if bootx64.efi does not exist * tests: remove bootx64.efi from expected files if uc22 * tests: removed /run/mnt/ubuntu-boot/EFI/boot/bootx64.efi testing from all systems --- .../manual/uc-update-assets-secure-add-sbat/task.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/nested/manual/uc-update-assets-secure-add-sbat/task.yaml b/tests/nested/manual/uc-update-assets-secure-add-sbat/task.yaml index 221f8243fa6..ea76d738206 100644 --- a/tests/nested/manual/uc-update-assets-secure-add-sbat/task.yaml +++ b/tests/nested/manual/uc-update-assets-secure-add-sbat/task.yaml @@ -124,27 +124,30 @@ prepare: | fi cat <>expected-before - ${old_shim_sha} */run/mnt/ubuntu-boot/EFI/boot/bootx64.efi ${old_grub_sha} */run/mnt/ubuntu-boot/EFI/boot/grubx64.efi EOF if [ "${UPDATE_BOOT}" = true ]; then cat <>expected-after - ${new_shim_sha} */run/mnt/ubuntu-boot/EFI/boot/bootx64.efi ${new_grub_sha} */run/mnt/ubuntu-boot/EFI/boot/grubx64.efi EOF else cat <>expected-after - ${old_shim_sha} */run/mnt/ubuntu-boot/EFI/boot/bootx64.efi ${old_grub_sha} */run/mnt/ubuntu-boot/EFI/boot/grubx64.efi EOF fi - + snap pack pc --filename=pc_2.snap remote.exec systemctl --wait is-system-running || true remote.wait-for snap-command remote.exec "sudo snap wait system seed.loaded" +debug: | + cat expected-before + cat expected-after + for file in $(remote.exec "find /run/mnt/ubuntu-boot/EFI/ -name '*.efi'"); do remote.exec "sha256sum $file"; done + for file in $(remote.exec "find /run/mnt/ubuntu-seed/EFI/ -name '*.efi'"); do remote.exec "sha256sum $file"; done + execute: | remote.exec "sha256sum -c"