Skip to content

Commit

Permalink
[guest-test] Test Enhance: drop kernel_img and initrd_img for osv_san…
Browse files Browse the repository at this point in the history
…ity common.json

drop kernel_img and initrd_img in osv_sanity common.json reference
config

[Test Components] tdx
[Test Types] any
[Supported Devices] spr,emr,gnr,srf

Signed-off-by: Hongyu Ning <[email protected]>
  • Loading branch information
hongyuni committed Nov 15, 2023
1 parent a4e7884 commit 923f554
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 1 addition & 3 deletions guest-test/osv_sanity/common.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{
"kernel_img": "/boot/vmlinuz-xxx-yyy",
"initrd_img": "/boot/initramfs-xxx-yyy",
"bios_img": "/path/to/EDKII/OVMF.fd or other virtual BIOS",
"qemu_img": "/path/to/qemu-kvm with proper capabilty of VM test",
"guest_img": "/path/to/prepared/guest_os_image, in qcow2 or raw image format",
"guest_img_format": "raw",
"guest_img_format": "raw or qcow2",
"boot_pattern": "*Kernel*on*an*x86_64*",
"guest_root_passwd": "123456"
}
10 changes: 8 additions & 2 deletions guest-test/qemu_get_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,14 @@
qemu_config = json.loads(raw_config)

# pre-config G-list variables' values confirmed by common.json
kernel_img = image_config["kernel_img"]
initrd_img = image_config["initrd_img"]
if os.path.isfile(image_config["kernel_img"]):
kernel_img = image_config["kernel_img"]
else:
kernel_img = "not_use"
if os.path.isfile(image_config["initrd_img"]):
initrd_img = image_config["initrd_img"]
else:
initrd_img = "not_use"
bios_img = image_config["bios_img"]
qemu_img = image_config["qemu_img"]
guest_img = image_config["guest_img"]
Expand Down

0 comments on commit 923f554

Please sign in to comment.