Browse Source

tests/qtest/bios-tables-test: Add test for disabling SPCR on RISC-V

Add ACPI SPCR table test case for RISC-V when SPCR was off.

Signed-off-by: Li Chen <chenl311@chinatelecom.cn>
Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
Message-Id: <20250528105404.457729-4-me@linux.beauty>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
pull/294/head
Li Chen 10 months ago
committed by Michael S. Tsirkin
parent
commit
da77fc6c2e
  1. 22
      tests/qtest/bios-tables-test.c

22
tests/qtest/bios-tables-test.c

@ -1807,6 +1807,26 @@ static void test_acpi_aarch64_virt_tcg_acpi_spcr(void)
" -machine spcr=off", &data);
free_test_data(&data);
}
static void test_acpi_riscv64_virt_tcg_acpi_spcr(void)
{
test_data data = {
.machine = "virt",
.arch = "riscv64",
.tcg_only = true,
.uefi_fl1 = "pc-bios/edk2-riscv-code.fd",
.uefi_fl2 = "pc-bios/edk2-riscv-vars.fd",
.cd = "tests/data/uefi-boot-images/bios-tables-test.riscv64.iso.qcow2",
.ram_start = 0x80000000ULL,
.scan_len = 128ULL * 1024 * 1024,
.variant = ".acpispcr",
};
test_acpi_one("-cpu rva22s64 "
"-machine spcr=off", &data);
free_test_data(&data);
}
static void test_acpi_tcg_acpi_hmat(const char *machine, const char *arch)
{
test_data data = {};
@ -2701,6 +2721,8 @@ int main(int argc, char *argv[])
qtest_add_func("acpi/virt", test_acpi_riscv64_virt_tcg);
qtest_add_func("acpi/virt/numamem",
test_acpi_riscv64_virt_tcg_numamem);
qtest_add_func("acpi/virt/acpispcr",
test_acpi_riscv64_virt_tcg_acpi_spcr);
}
} else if (strcmp(arch, "loongarch64") == 0) {
if (has_tcg) {

Loading…
Cancel
Save