Skip to content

Commit

Permalink
KVM: Update the TDX basic test case
Browse files Browse the repository at this point in the history
Check host environment firstly, then try to boot TD.

Signed-off-by: Xudong Hao <[email protected]>
  • Loading branch information
xhao22 committed Sep 25, 2024
1 parent 803d102 commit 359c5f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions KVM/qemu/tdx_basic.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
# Don't create/remove guest images
force_create_image = no
remove_image = no
# Automatically start VM
start_vm = yes
start_vm = no
# Stop VM after testing
kill_vm = yes
shell_prompt = "^\[.*\][\#\$]\s*$"
Expand Down
4 changes: 3 additions & 1 deletion KVM/qemu/tests/tdx_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# History: May. 2024 - Xudong Hao - creation

from avocado.utils import process, cpu
from virttest import error_context
from virttest import error_context, env_process
from provider.cpu_utils import check_cpu_flags


Expand Down Expand Up @@ -41,6 +41,8 @@ def run(test, params, env):
if tdx_value != "Y":
test.fail("TDX is not supported in KVM")

params["start_vm"] = "yes"
env_process.preprocess_vm(test, params, env, params["main_vm"])
vm = env.get_vm(params["main_vm"])
vm.verify_alive()
timeout = params.get_numeric("login_timeout", 240)
Expand Down

0 comments on commit 359c5f1

Please sign in to comment.