From 00bee62653a2948bab294fecbf7acf3629052068 Mon Sep 17 00:00:00 2001 From: Muminul Islam Date: Thu, 23 Apr 2026 15:02:03 -0700 Subject: [PATCH] scripts: skip checksum for custom-provided workloads Skip sha1sum verification for firmware files that were provided via CH_CUSTOM_FIRMWARE or CH_CUSTOM_OVMF environment variables. Custom files will not match the expected checksums, so we filter them out of the sha1sums list before running sha1sum --check. Updated scripts: - run_integration_tests_x86_64.sh - run_integration_tests_aarch64.sh Assisted-by: GitHub Copilot:Claude-Opus-4.6 Signed-off-by: Muminul Islam --- scripts/run_integration_tests_aarch64.sh | 14 +++++++++++--- scripts/run_integration_tests_x86_64.sh | 18 +++++++++++++++--- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/scripts/run_integration_tests_aarch64.sh b/scripts/run_integration_tests_aarch64.sh index 320536b92..941b717b5 100755 --- a/scripts/run_integration_tests_aarch64.sh +++ b/scripts/run_integration_tests_aarch64.sh @@ -141,9 +141,17 @@ update_workloads() { pushd "$WORKLOADS_DIR" || exit - if ! sha1sum sha1sums-aarch64-common --check; then - echo "sha1sum validation of images failed, remove invalid images to fix the issue." - exit 1 + # Skip checksum verification for custom-provided workloads + if [ -n "$CH_CUSTOM_OVMF" ]; then + if ! grep -v "CLOUDHV_EFI.fd" sha1sums-aarch64-common | sha1sum --check; then + echo "sha1sum validation of images failed, remove invalid images to fix the issue." + exit 1 + fi + else + if ! sha1sum sha1sums-aarch64-common --check; then + echo "sha1sum validation of images failed, remove invalid images to fix the issue." + exit 1 + fi fi popd || exit diff --git a/scripts/run_integration_tests_x86_64.sh b/scripts/run_integration_tests_x86_64.sh index f847cd57b..df080c717 100755 --- a/scripts/run_integration_tests_x86_64.sh +++ b/scripts/run_integration_tests_x86_64.sh @@ -116,9 +116,21 @@ if [ ! -f "$ALPINE_INITRAMFS_IMAGE" ]; then fi pushd "$WORKLOADS_DIR" || exit -if ! sha1sum sha1sums-x86_64 sha1sums-x86_64-common --check; then - echo "sha1sum validation of images failed, remove invalid images to fix the issue." - exit 1 +# Skip checksum verification for custom-provided workloads +sha1_exclude="" +[ -n "$CH_CUSTOM_FIRMWARE" ] && sha1_exclude="${sha1_exclude}|hypervisor-fw" +[ -n "$CH_CUSTOM_OVMF" ] && sha1_exclude="${sha1_exclude}|CLOUDHV\\.fd" +sha1_exclude="${sha1_exclude#|}" +if [ -n "$sha1_exclude" ]; then + if ! cat sha1sums-x86_64 sha1sums-x86_64-common | grep -Ev "$sha1_exclude" | sha1sum --check; then + echo "sha1sum validation of images failed, remove invalid images to fix the issue." + exit 1 + fi +else + if ! sha1sum sha1sums-x86_64 sha1sums-x86_64-common --check; then + echo "sha1sum validation of images failed, remove invalid images to fix the issue." + exit 1 + fi fi popd || exit