On Fri, 25 Aug 2023 11:36:09 +0800 Zhao Liu <[email protected]> wrote:
> From: Zhao Liu <[email protected]> > > This tests the commit 196ea60a734c3 ("hw/smbios: Fix core count in > type4"). > > Test the core count field of type4 table for multiple sockets/dies case. > > Suggested-by: Igor Mammedov <[email protected]> > Signed-off-by: Zhao Liu <[email protected]> > --- > tests/qtest/bios-tables-test.c | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > > diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c > index 8679255449cf..a35c753a3a00 100644 > --- a/tests/qtest/bios-tables-test.c > +++ b/tests/qtest/bios-tables-test.c > @@ -999,6 +999,23 @@ static void test_acpi_q35_tcg_type4_count(void) > free_test_data(&data); > } > > +static void test_acpi_q35_tcg_core_count(void) > +{ > + test_data data = { > + .machine = MACHINE_Q35, > + .variant = ".core-count", > + .required_struct_types = base_required_struct_types, > + .required_struct_types_len = ARRAY_SIZE(base_required_struct_types), > + .smbios_core_count = 9, > + .smbios_core_count2 = 9, > + }; > + > + test_acpi_one("-machine smbios-entry-point-type=64 " > + "-smp 54,sockets=2,dies=3,cores=3,threads=3", ditto as for 3/16 It's not obvious why this topology is used and how it correlates to smbios_core_* so describe setup in commit message > + &data); > + free_test_data(&data); > +} > + > static void test_acpi_q35_tcg_core_count2(void) > { > test_data data = { > @@ -2166,6 +2183,8 @@ int main(int argc, char *argv[]) > qtest_add_func("acpi/q35/kvm/dmar", test_acpi_q35_kvm_dmar); > qtest_add_func("acpi/q35/type4-count", > test_acpi_q35_tcg_type4_count); > + qtest_add_func("acpi/q35/core-count", > + test_acpi_q35_tcg_core_count); > qtest_add_func("acpi/q35/core-count2", > test_acpi_q35_tcg_core_count2); > }
