tests: Expand confidential test to support SNP

Let's expand the confidential test to also support SNP.

Fixes: #7184

Signed-off-by: Unmesh Deodhar <udeodhar@amd.com>
This commit is contained in:
Unmesh Deodhar 2023-07-27 09:55:15 -05:00 committed by Fabiano Fidêncio
parent c3b9d4945e
commit e31f099be1
2 changed files with 2 additions and 1 deletions

View File

@ -27,6 +27,7 @@ function setup_unencrypted_confidential_pod() {
function get_remote_command_per_hypervisor() {
declare -A REMOTE_COMMAND_PER_HYPERVISOR
REMOTE_COMMAND_PER_HYPERVISOR[qemu-sev]="dmesg | grep \"Memory Encryption Features active:.*\(SEV$\|SEV \)\""
REMOTE_COMMAND_PER_HYPERVISOR[qemu-snp]="dmesg | grep \"Memory Encryption Features active:.*SEV-SNP\""
echo "${REMOTE_COMMAND_PER_HYPERVISOR[${KATA_HYPERVISOR}]}"
}

View File

@ -10,7 +10,7 @@ load "${BATS_TEST_DIRNAME}/confidential_common.sh"
load "${BATS_TEST_DIRNAME}/tests_common.sh"
setup() {
SUPPORTED_HYPERVISORS=("qemu-sev")
SUPPORTED_HYPERVISORS=("qemu-sev" "qemu-snp")
# This check must be done with "<SPACE>${KATA_HYPERVISOR}<SPACE>" to avoid
# having substrings, like qemu, being matched with qemu-$something.