From 15a9d9a16daac567e81478405c52837b0d4bb94e Mon Sep 17 00:00:00 2001 From: Babis Chalios Date: Tue, 3 Sep 2024 11:56:39 +0200 Subject: [PATCH] ci: drop guest 4.14 kernel Change resources/rebuild.sh to not re-build 4.14 kernels. Also, drop various fixtures for 4.14 kernels in the CI and switch to 5.10 wherever the default was 4.14. Signed-off-by: Babis Chalios --- resources/rebuild.sh | 1 - tests/conftest.py | 3 --- tests/framework/artifacts.py | 2 +- .../functional/test_cpu_features_aarch64.py | 15 ++++----------- .../performance/test_boottime.py | 4 ++-- .../performance/test_snapshot_ab.py | 10 +++++----- .../performance/test_snapshot_perf.py | 4 ++-- 7 files changed, 14 insertions(+), 25 deletions(-) diff --git a/resources/rebuild.sh b/resources/rebuild.sh index be9e90308b3..0ae916a5576 100755 --- a/resources/rebuild.sh +++ b/resources/rebuild.sh @@ -220,7 +220,6 @@ clone_amazon_linux_repo # Apply kernel patches on top of AL configuration apply_kernel_patches_for_ci -build_al_kernel $PWD/guest_configs/microvm-kernel-ci-$ARCH-4.14.config build_al_kernel $PWD/guest_configs/microvm-kernel-ci-$ARCH-5.10.config if [ $ARCH == "x86_64" ]; then build_al_kernel $PWD/guest_configs/microvm-kernel-ci-$ARCH-5.10-no-acpi.config diff --git a/tests/conftest.py b/tests/conftest.py index 48c9c08a402..8e4c2e2848e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -382,9 +382,6 @@ def rootfs_fxt(request, record_property): lambda kernel: "no-acpi" not in kernel.id, kernel_params("vmlinux-*") ), ) -guest_kernel_linux_4_14 = pytest.fixture( - guest_kernel_fxt, params=kernel_params("vmlinux-4.14*") -) guest_kernel_linux_5_10 = pytest.fixture( guest_kernel_fxt, params=filter( diff --git a/tests/framework/artifacts.py b/tests/framework/artifacts.py index ccd22154df2..0283be41941 100644 --- a/tests/framework/artifacts.py +++ b/tests/framework/artifacts.py @@ -21,7 +21,7 @@ def select_supported_kernels(): """Select guest kernels supported by the current combination of kernel and instance type. """ - supported_kernels = [r"vmlinux-4.14.\d+", r"vmlinux-5.10.\d+", r"vmlinux-6.1.\d+"] + supported_kernels = [r"vmlinux-5.10.\d+", r"vmlinux-6.1.\d+"] # Booting with MPTable is deprecated but we still want to test # for it. Until we drop support for it we will be building a 5.10 guest diff --git a/tests/integration_tests/functional/test_cpu_features_aarch64.py b/tests/integration_tests/functional/test_cpu_features_aarch64.py index 634c72d1692..b69a4f25fcd 100644 --- a/tests/integration_tests/functional/test_cpu_features_aarch64.py +++ b/tests/integration_tests/functional/test_cpu_features_aarch64.py @@ -19,15 +19,12 @@ ).split(" ") ) -DEFAULT_G3_FEATURES_4_14 = DEFAULT_G2_FEATURES | set( - "sha512 asimdfhm dit uscat ilrcpc flagm jscvt fcma sha3 sm3 sm4 rng".split(" ") +DEFAULT_G3_FEATURES_5_10 = set( + "sha512 asimdfhm dit uscat ilrcpc flagm jscvt fcma sha3 sm3 sm4 rng dcpodp i8mm bf16 dgh".split( + " " + ) ) -DEFAULT_G3_FEATURES_5_10 = DEFAULT_G3_FEATURES_4_14 | set( - "dcpodp i8mm bf16 dgh".split(" ") -) - -DEFAULT_G3_FEATURES_WITH_SVE_AND_PAC_4_14 = DEFAULT_G3_FEATURES_4_14 DEFAULT_G3_FEATURES_WITH_SVE_AND_PAC_5_10 = DEFAULT_G3_FEATURES_5_10 | set( "paca pacg sve svebf16 svei8mm".split(" ") ) @@ -42,10 +39,6 @@ def _check_cpu_features_arm(test_microvm, guest_kv, template_name=None): expected_cpu_features = DEFAULT_G2_FEATURES case CpuModel.ARM_NEOVERSE_N1, _, None: expected_cpu_features = DEFAULT_G2_FEATURES - case CpuModel.ARM_NEOVERSE_V1, "4.14", "aarch64_with_sve_and_pac": - expected_cpu_features = DEFAULT_G3_FEATURES_WITH_SVE_AND_PAC_4_14 - case CpuModel.ARM_NEOVERSE_V1, "4.14", None: - expected_cpu_features = DEFAULT_G3_FEATURES_4_14 # [cm]7g with guest kernel 5.10 and later case CpuModel.ARM_NEOVERSE_V1, _, "v1n1": diff --git a/tests/integration_tests/performance/test_boottime.py b/tests/integration_tests/performance/test_boottime.py index b5f36f842a1..ebf650b7dfc 100644 --- a/tests/integration_tests/performance/test_boottime.py +++ b/tests/integration_tests/performance/test_boottime.py @@ -31,7 +31,7 @@ @pytest.fixture -def fast_microvm(microvm_factory, guest_kernel_linux_4_14, rootfs_rw): +def fast_microvm(microvm_factory, guest_kernel_linux_5_10, rootfs_rw): """The microvm defined for the boottime SLA Guest kernel 4.14 @@ -40,7 +40,7 @@ def fast_microvm(microvm_factory, guest_kernel_linux_4_14, rootfs_rw): Using ext4 seems to result in a faster boot than with squashfs. Probably because we have to spend CPU time decompressing and extracting into memory. """ - return microvm_factory.build(kernel=guest_kernel_linux_4_14, rootfs=rootfs_rw) + return microvm_factory.build(kernel=guest_kernel_linux_5_10, rootfs=rootfs_rw) def test_no_boottime(uvm_plain): diff --git a/tests/integration_tests/performance/test_snapshot_ab.py b/tests/integration_tests/performance/test_snapshot_ab.py index b776f7981e1..bbfb8b011e4 100644 --- a/tests/integration_tests/performance/test_snapshot_ab.py +++ b/tests/integration_tests/performance/test_snapshot_ab.py @@ -77,14 +77,14 @@ def configure_vm( return vm def sample_latency( - self, microvm_factory, snapshot, guest_kernel_linux_4_14 + self, microvm_factory, snapshot, guest_kernel_linux_5_10 ) -> List[float]: """Collects latency samples for the microvm configuration specified by this instance""" values = [] for _ in range(ITERATIONS): microvm = microvm_factory.build( - kernel=guest_kernel_linux_4_14, + kernel=guest_kernel_linux_5_10, monitor_memory=False, ) microvm.spawn(emit_metrics=True) @@ -127,7 +127,7 @@ def sample_latency( ids=lambda x: x.id, ) def test_restore_latency( - microvm_factory, rootfs, guest_kernel_linux_4_14, test_setup, metrics + microvm_factory, rootfs, guest_kernel_linux_5_10, test_setup, metrics ): """ Restores snapshots with vcpu/memory configuration, roughly scaling according to mem = (vcpus - 1) * 2048MB, @@ -136,7 +136,7 @@ def test_restore_latency( We only test a single guest kernel, as the guest kernel does not "participate" in snapshot restore. """ - vm = test_setup.configure_vm(microvm_factory, guest_kernel_linux_4_14, rootfs) + vm = test_setup.configure_vm(microvm_factory, guest_kernel_linux_5_10, rootfs) vm.start() vm.wait_for_up() @@ -157,7 +157,7 @@ def test_restore_latency( samples = test_setup.sample_latency( microvm_factory, snapshot, - guest_kernel_linux_4_14, + guest_kernel_linux_5_10, ) for sample in samples: diff --git a/tests/integration_tests/performance/test_snapshot_perf.py b/tests/integration_tests/performance/test_snapshot_perf.py index 1fd331f3c5f..f1c13e7be25 100644 --- a/tests/integration_tests/performance/test_snapshot_perf.py +++ b/tests/integration_tests/performance/test_snapshot_perf.py @@ -21,13 +21,13 @@ def snapshot_create_producer(vm): def test_snapshot_create_latency( microvm_factory, - guest_kernel_linux_4_14, + guest_kernel_linux_5_10, rootfs, metrics, ): """Measure the latency of creating a Full snapshot""" - vm = microvm_factory.build(guest_kernel_linux_4_14, rootfs, monitor_memory=False) + vm = microvm_factory.build(guest_kernel_linux_5_10, rootfs, monitor_memory=False) vm.spawn() vm.basic_config(vcpu_count=2, mem_size_mib=512) vm.start()