File tree Expand file tree Collapse file tree 2 files changed +13
-10
lines changed
tests/integration_tests/functional
tools/create_snapshot_artifact Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 55
66import json
77import logging
8+ import platform
89from pathlib import Path
910
1011import pytest
1617 guest_run_fio_iteration ,
1718 populate_data_store ,
1819)
19- from framework .utils_cpuid import CpuVendor , get_cpu_vendor
20+ from framework .utils_cpu_templates import get_supported_cpu_templates
2021from framework .utils_vsock import check_vsock_device
2122from integration_tests .functional .test_balloon import (
2223 get_stable_rss_mem_by_pid ,
@@ -74,9 +75,10 @@ def get_snapshot_dirs():
7475 """Get all the snapshot directories"""
7576 snapshot_root_name = "snapshot_artifacts"
7677 snapshot_root_dir = Path (FC_WORKSPACE_DIR ) / snapshot_root_name
77- cpu_templates = ["C3" , "T2" , "T2S" , "None" ]
78- if get_cpu_vendor () != CpuVendor . INTEL :
78+ cpu_templates = []
79+ if platform . machine () == "x86_64" :
7980 cpu_templates = ["None" ]
81+ cpu_templates += get_supported_cpu_templates ()
8082 for cpu_template in cpu_templates :
8183 for snapshot_dir in snapshot_root_dir .glob (f"*_{ cpu_template } _guest_snapshot" ):
8284 assert snapshot_dir .is_dir ()
Original file line number Diff line number Diff line change 55
66import json
77import os
8+ import platform
89import re
910import shutil
1011import sys
2122 generate_mmds_get_request ,
2223 generate_mmds_session_token ,
2324)
24- from framework .utils_cpuid import CpuVendor , get_cpu_vendor
25+ from framework .utils_cpu_templates import get_supported_cpu_templates
2526from host_tools .cargo_build import get_firecracker_binaries
2627
27-
2828# pylint: enable=wrong-import-position
2929
3030# Default IPv4 address to route MMDS requests.
@@ -78,8 +78,8 @@ def main():
7878 |
7979 -> vm.mem
8080 -> vm.vmstate
81- -> ubuntu-18 .04.id_rsa
82- -> ubuntu-18 .04.ext4
81+ -> ubuntu-22 .04.id_rsa
82+ -> ubuntu-22 .04.ext4
8383 -> <guest_kernel_supported_1>_<cpu_template>_guest_snapshot
8484 |
8585 ...
@@ -90,9 +90,10 @@ def main():
9090 shutil .rmtree (SNAPSHOT_ARTIFACTS_ROOT_DIR , ignore_errors = True )
9191 vm_factory = MicroVMFactory (* get_firecracker_binaries ())
9292
93- cpu_templates = ["None" ]
94- if get_cpu_vendor () == CpuVendor .INTEL :
95- cpu_templates .extend (["C3" , "T2" , "T2S" ])
93+ cpu_templates = []
94+ if platform .machine () == "x86_64" :
95+ cpu_templates = ["None" ]
96+ cpu_templates += get_supported_cpu_templates ()
9697
9798 for cpu_template in cpu_templates :
9899 for kernel in kernels (glob = "vmlinux-*" ):
You can’t perform that action at this time.
0 commit comments