From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56420) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2gEU-0001dj-Hf for qemu-devel@nongnu.org; Tue, 17 May 2016 10:44:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2gET-0006XR-7y for qemu-devel@nongnu.org; Tue, 17 May 2016 10:44:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36258) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2gES-0006XN-W6 for qemu-devel@nongnu.org; Tue, 17 May 2016 10:44:25 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 66425C01BC82 for ; Tue, 17 May 2016 14:44:24 +0000 (UTC) From: Igor Mammedov Date: Tue, 17 May 2016 16:43:24 +0200 Message-Id: <1463496205-251412-33-git-send-email-imammedo@redhat.com> In-Reply-To: <1463496205-251412-1-git-send-email-imammedo@redhat.com> References: <1463496205-251412-1-git-send-email-imammedo@redhat.com> Subject: [Qemu-devel] [PATCH 32/33] tests: acpi: add CPU hotplug testcase List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: mst@redhat.com, rkrcmar@redhat.com, ehabkost@redhat.com, drjones@redhat.com, armbru@redhat.com, marcel@redhat.com Test with: -smp 2,cores=3,sockets=2,maxcpus=6 \ -numa node,cpus=0-2 -numa node,cpus=3-5 to capture sparse APIC ID values that default AMD CPU has in above configuration and SRAT table genarated with NUMA option on. Signed-off-by: Igor Mammedov --- to keep series bisectable include new template files for SRAT tables so tha test won't fail with: ERROR:tests/bios-tables-test.c:498:load_expected_aml: assertion failed: (exp_sdt.aml_file) --- tests/acpi-test-data/pc/SRAT.cphp | Bin 0 -> 304 bytes tests/acpi-test-data/q35/SRAT.cphp | Bin 0 -> 304 bytes tests/bios-tables-test.c | 30 ++++++++++++++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 tests/acpi-test-data/pc/SRAT.cphp create mode 100644 tests/acpi-test-data/q35/SRAT.cphp diff --git a/tests/acpi-test-data/pc/SRAT.cphp b/tests/acpi-test-data/pc/SRAT.cphp new file mode 100644 index 0000000000000000000000000000000000000000..ff2137642f488ec70b85207ed6c20e7351d61e98 GIT binary patch literal 304 zcmWFzattwGWME)4bMklg2v%^42yhMtiUEZfKx_~V!f+sf!DmF1XF}yOvY_!<(fDl0 pd`1npO;83GTmZW|po75R12aq^syaB21u74tQT&BzFU&Ml8UVWm2>}2A literal 0 HcmV?d00001 diff --git a/tests/acpi-test-data/q35/SRAT.cphp b/tests/acpi-test-data/q35/SRAT.cphp new file mode 100644 index 0000000000000000000000000000000000000000..ff2137642f488ec70b85207ed6c20e7351d61e98 GIT binary patch literal 304 zcmWFzattwGWME)4bMklg2v%^42yhMtiUEZfKx_~V!f+sf!DmF1XF}yOvY_!<(fDl0 pd`1npO;83GTmZW|po75R12aq^syaB21u74tQT&BzFU&Ml8UVWm2>}2A literal 0 HcmV?d00001 diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c index 9acf9ba..b74ec7f 100644 --- a/tests/bios-tables-test.c +++ b/tests/bios-tables-test.c @@ -789,6 +789,34 @@ static void test_acpi_q35_tcg_bridge(void) free_test_data(&data); } +static void test_acpi_piix4_tcg_cphp(void) +{ + test_data data; + + memset(&data, 0, sizeof(data)); + data.machine = MACHINE_PC; + data.variant = ".cphp"; + test_acpi_one("-machine accel=tcg" + " -smp 2,cores=3,sockets=2,maxcpus=6" + " -numa node,cpus=0-2 -numa node,cpus=3-5", + &data); + free_test_data(&data); +} + +static void test_acpi_q35_tcg_cphp(void) +{ + test_data data; + + memset(&data, 0, sizeof(data)); + data.machine = MACHINE_Q35; + data.variant = ".cphp"; + test_acpi_one("-machine q35,accel=tcg" + " -smp 2,cores=3,sockets=2,maxcpus=6" + " -numa node,cpus=0-2 -numa node,cpus=3-5", + &data); + free_test_data(&data); +} + int main(int argc, char *argv[]) { const char *arch = qtest_get_arch(); @@ -805,6 +833,8 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/piix4/tcg/bridge", test_acpi_piix4_tcg_bridge); qtest_add_func("acpi/q35/tcg", test_acpi_q35_tcg); qtest_add_func("acpi/q35/tcg/bridge", test_acpi_q35_tcg_bridge); + qtest_add_func("acpi/piix4/tcg/cpuhp", test_acpi_piix4_tcg_cphp); + qtest_add_func("acpi/q35/tcg/cpuhp", test_acpi_q35_tcg_cphp); } ret = g_test_run(); boot_sector_cleanup(disk); -- 1.8.3.1