From 9c204cf0cb961918d337f713b142cbbe73dbdc34 Mon Sep 17 00:00:00 2001 From: Akira Moroo Date: Fri, 5 Sep 2025 09:22:12 +0000 Subject: [PATCH 1/3] scripts: Update Clear Linux image donwload URL Signed-off-by: Akira Moroo --- scripts/fetch_images.sh | 6 +++--- scripts/run_unit_tests.sh | 2 +- src/integration.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/fetch_images.sh b/scripts/fetch_images.sh index bc52fd57..b07f06f1 100755 --- a/scripts/fetch_images.sh +++ b/scripts/fetch_images.sh @@ -61,8 +61,8 @@ fetch_raw_ubuntu_image() { fetch_clear_image() { OS_VERSION="$1" - OS_IMAGE_NAME="clear-$OS_VERSION-cloudguest.img" - OS_IMAGE_BASE="https://cdn.download.clearlinux.org/releases/$OS_VERSION/clear" + OS_IMAGE_NAME="clear-$OS_VERSION-kvm.img" + OS_IMAGE_BASE="https://ch-images.azureedge.net" OS_IMAGE_URL="$OS_IMAGE_BASE/$OS_IMAGE_NAME.xz" fetch_image "$OS_IMAGE_NAME" "$OS_IMAGE_URL" xz -d "$OS_IMAGE_NAME.xz" @@ -74,7 +74,7 @@ aarch64_fetch_disk_images() { } x86_64_fetch_disk_images() { - fetch_clear_image "31310" + fetch_clear_image "28660" fetch_raw_ubuntu_image "focal" "amd64" "current" fetch_raw_ubuntu_image "jammy" "amd64" "current" diff --git a/scripts/run_unit_tests.sh b/scripts/run_unit_tests.sh index 77cfac4d..1823a930 100755 --- a/scripts/run_unit_tests.sh +++ b/scripts/run_unit_tests.sh @@ -10,7 +10,7 @@ make_test_disks "$WORKLOADS_DIR" CLEAR_OS_VERSION="28660" CLEAR_OS_IMAGE_XZ_NAME="clear-$CLEAR_OS_VERSION-kvm.img.xz" -CLEAR_OS_IMAGE_XZ_URL="https://download.clearlinux.org/releases/$CLEAR_OS_VERSION/clear/$CLEAR_OS_IMAGE_XZ_NAME" +CLEAR_OS_IMAGE_XZ_URL="https://ch-images.azureedge.net/$CLEAR_OS_IMAGE_XZ_NAME" CLEAR_OS_IMAGE_XZ="$WORKLOADS_DIR/$CLEAR_OS_IMAGE_XZ_NAME" if [ ! -f "$CLEAR_OS_IMAGE_XZ" ]; then pushd $WORKLOADS_DIR diff --git a/src/integration.rs b/src/integration.rs index 88ee636f..962ef317 100644 --- a/src/integration.rs +++ b/src/integration.rs @@ -627,7 +627,7 @@ mod tests { const FOCAL_IMAGE_NAME: &str = "focal-server-cloudimg-amd64-raw.img"; const JAMMY_IMAGE_NAME: &str = "jammy-server-cloudimg-amd64-raw.img"; - const CLEAR_IMAGE_NAME: &str = "clear-31310-cloudguest.img"; + const CLEAR_IMAGE_NAME: &str = "clear-28660-kvm.img"; #[test] fn test_boot_qemu_focal() { From 789bd9801a792c0db4ef8cc03e477b63ec3202a7 Mon Sep 17 00:00:00 2001 From: Akira Moroo Date: Fri, 5 Sep 2025 09:25:13 +0000 Subject: [PATCH 2/3] integration: Remove Clear Linux tests Signed-off-by: Akira Moroo --- src/integration.rs | 65 ---------------------------------------------- 1 file changed, 65 deletions(-) diff --git a/src/integration.rs b/src/integration.rs index 962ef317..52822f68 100644 --- a/src/integration.rs +++ b/src/integration.rs @@ -52,59 +52,6 @@ mod tests { fn prepare(&self, tmp_dir: &TempDir, network: &GuestNetworkConfig) -> String; } - struct ClearCloudInit {} - impl CloudInit for ClearCloudInit { - fn prepare(&self, tmp_dir: &TempDir, network: &GuestNetworkConfig) -> String { - let cloudinit_file_path = - String::from(tmp_dir.path().join("cloudinit").to_str().unwrap()); - let cloud_init_directory = tmp_dir - .path() - .join("cloud-init") - .join("clear") - .join("openstack"); - fs::create_dir_all(cloud_init_directory.join("latest")) - .expect("Expect creating cloud-init directory to succeed"); - let source_file_dir = std::env::current_dir() - .unwrap() - .join("resources") - .join("cloud-init") - .join("clear") - .join("openstack") - .join("latest"); - fs::copy( - source_file_dir.join("meta_data.json"), - cloud_init_directory.join("latest").join("meta_data.json"), - ) - .expect("Expect copying cloud-init meta_data.json to succeed"); - let mut user_data_string = String::new(); - fs::File::open(source_file_dir.join("user_data")) - .unwrap() - .read_to_string(&mut user_data_string) - .expect("Expected reading user_data file in to succeed"); - user_data_string = user_data_string.replace("192.168.2.1", &network.host_ip); - user_data_string = user_data_string.replace("192.168.2.2", &network.guest_ip); - - user_data_string = user_data_string.replace("12:34:56:78:90:ab", &network.guest_mac); - fs::File::create(cloud_init_directory.join("latest").join("user_data")) - .unwrap() - .write_all(user_data_string.as_bytes()) - .expect("Expected writing out user_data to succeed"); - std::process::Command::new("mkdosfs") - .args(["-n", "config-2"]) - .args(["-C", cloudinit_file_path.as_str()]) - .arg("8192") - .output() - .expect("Expect creating disk image to succeed"); - std::process::Command::new("mcopy") - .arg("-o") - .args(["-i", cloudinit_file_path.as_str()]) - .args(["-s", cloud_init_directory.to_str().unwrap(), "::"]) - .output() - .expect("Expect copying files to disk image to succeed"); - cloudinit_file_path - } - } - struct UbuntuCloudInit {} impl CloudInit for UbuntuCloudInit { fn prepare(&self, tmp_dir: &TempDir, network: &GuestNetworkConfig) -> String { @@ -627,7 +574,6 @@ mod tests { const FOCAL_IMAGE_NAME: &str = "focal-server-cloudimg-amd64-raw.img"; const JAMMY_IMAGE_NAME: &str = "jammy-server-cloudimg-amd64-raw.img"; - const CLEAR_IMAGE_NAME: &str = "clear-28660-kvm.img"; #[test] fn test_boot_qemu_focal() { @@ -639,11 +585,6 @@ mod tests { test_boot(JAMMY_IMAGE_NAME, &UbuntuCloudInit {}, spawn_qemu) } - #[test] - fn test_boot_qemu_clear() { - test_boot(CLEAR_IMAGE_NAME, &ClearCloudInit {}, spawn_qemu) - } - #[test] #[cfg(not(feature = "coreboot"))] fn test_boot_ch_focal() { @@ -655,12 +596,6 @@ mod tests { fn test_boot_ch_jammy() { test_boot(JAMMY_IMAGE_NAME, &UbuntuCloudInit {}, spawn_ch) } - - #[test] - #[cfg(not(feature = "coreboot"))] - fn test_boot_ch_clear() { - test_boot(CLEAR_IMAGE_NAME, &ClearCloudInit {}, spawn_ch) - } } } From 54f7a8c73cbfa2d0530e863614b25f1648c235a0 Mon Sep 17 00:00:00 2001 From: Akira Moroo Date: Fri, 5 Sep 2025 09:26:50 +0000 Subject: [PATCH 3/3] scripts: Remove Clear Linux from fetch_images.sh Signed-off-by: Akira Moroo --- scripts/fetch_images.sh | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/scripts/fetch_images.sh b/scripts/fetch_images.sh index b07f06f1..1fdaae98 100755 --- a/scripts/fetch_images.sh +++ b/scripts/fetch_images.sh @@ -59,23 +59,12 @@ fetch_raw_ubuntu_image() { convert_image "$OS_IMAGE_NAME" "$OS_RAW_IMAGE_NAME" } -fetch_clear_image() { - OS_VERSION="$1" - OS_IMAGE_NAME="clear-$OS_VERSION-kvm.img" - OS_IMAGE_BASE="https://ch-images.azureedge.net" - OS_IMAGE_URL="$OS_IMAGE_BASE/$OS_IMAGE_NAME.xz" - fetch_image "$OS_IMAGE_NAME" "$OS_IMAGE_URL" - xz -d "$OS_IMAGE_NAME.xz" -} - aarch64_fetch_disk_images() { fetch_raw_ubuntu_image "focal" "arm64" "current" fetch_raw_ubuntu_image "jammy" "arm64" "current" } x86_64_fetch_disk_images() { - fetch_clear_image "28660" - fetch_raw_ubuntu_image "focal" "amd64" "current" fetch_raw_ubuntu_image "jammy" "amd64" "current" }