diff mbox

[PULL,04/34] bios: Add tests for the IPMI ACPI and SMBIOS entries

Message ID 20160624085413-mutt-send-email-mst@redhat.com
State Accepted
Commit f4eda2d429ecd85a99008c6c4fc74cf81b2f1498
Headers show

Commit Message

Michael S. Tsirkin June 24, 2016, 5:54 a.m. UTC
From: Corey Minyard <cminyard@mvista.com>


Signed-off-by: Corey Minyard <cminyard@mvista.com>

Reviewed-by: Michael S. Tsirkin <mst@redhat.com>

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

---
 tests/bios-tables-test.c             |  60 ++++++++++++++++++++++++++++++++---
 tests/acpi-test-data/pc/DSDT.ipmikcs | Bin 0 -> 5575 bytes
 tests/acpi-test-data/q35/DSDT.ipmibt | Bin 0 -> 8340 bytes
 3 files changed, 56 insertions(+), 4 deletions(-)
 create mode 100644 tests/acpi-test-data/pc/DSDT.ipmikcs
 create mode 100644 tests/acpi-test-data/q35/DSDT.ipmibt

diff --git a/tests/acpi-test-data/pc/DSDT.ipmikcs b/tests/acpi-test-data/pc/DSDT.ipmikcs
new file mode 100644
index 0000000000000000000000000000000000000000..f10cd9e296c942b66d6f2404f1a95fe5cc4a6796
GIT binary patch
literal 5575
zcmb7I-ESMm5ud#yrQ?#6j?!6{?Ib4Tug0xye%Nw?7KO+=N~FxA&OFL>aYpYb$tcw(
z^+Ab&$U*>_0Td^1DdVDjqg_7Re?s%tKITtI|AiDy{1kQOj!Ushu1E>+I3K^Ancbb4
z-J@X}t-qfDU|*Ei^s1dL-?elDWefm_reC!dy9ds`QC@LbQi?I>aWbIsQC75{8RhjA
z_UDfGC(nETV~@3c*m$l!-DvwCJ@GbxKo2*3&WTVLT)XT#-7}V6%PDTPW~54Aa#?Xp
zMiUfwy=E}gR6<Nesalnm05Jri8pEhsEfZ1zUw)T_nDbaAe)dkKVPvhQ;byf(*KU=-
zCyD2isQt*}s@G3_*7Km}B@Yh=(4YFO*M`sADfs8V;{zD*X~or>b|%B84iY$HG!8L<
zT~IGvrD!Nzr+dn}n=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4
zRjU~;+JCnJY<xei!M%VNOvBfdH}6sVE4niiF@`}Sechc=VtAj%n=*1YNJA4)e}1%l
zPWS5auk__GfZG*w9e1rj=woeEjjM5%LNBYk_ktUpsf_Jc(8_|QG~RhRURdU-^Hwdo
zNdo8d&f~Mh$W($^DoA|PiK-)onTf6Wbpn)Ni3d#uQyyDY(3$9->O4LXj>krpr6k3N
zt!K3f>SmH^KA_`5DWewGHfiT_c$KF2N~e3-&JP((0tqynV&1?WN<={rMIxN;n|A&!
z9B8jMhVP{~L<Vgp=>K%>B?qJ?Xo1WU6i;n*g;0D8iGT{LaRH4-L5spF9(SSDiAboh
zIw_!&QPAtcD!x^PR+UJou$mCiL=^Ofu*wCLM?!^FJfgz@l2On_VKpV7sYs}>nikM>
z6!fOBIwhb}kx*e3@8e;t(^1g3gjH2Q)kvtYni0@U6!dLjbw)sEBB8?Stboo&K}*6a
zW_~y=EfOlMo)FLzQP8rmIwzoWkx*gvq=24`g6hKRynxO}LWR{+0(vS6Y6z>R1@v?z
zR9HPDpl70>6=C%?0evkJDy+UPpsz<kmxa|g1oVwasIYogK+paVRI8pb?lf9bKegAv
zmx2T8b=v`>B7@y5WU|Bv%@Q)$kwVQrF{DZFb&~ks)`5*}WyndyjdU^OusIBM<m<*r
zN6xUshdT1MIMR_jEYzWn{M{to^j-(MD;{kJHWr-V@o+=_NRLO{fsLgj^!V0;{E=QI
z9*aQevjKmkUm_mUS?Koz{zxCp7!y<I@h~~C^)Wro8dGefr+FJ=dYU;V%SfLkeoViF
gJZ}3)zfU~swX<|j!aw@xpBCCeJnPokkTAIXABOi<OaK4?

literal 0
HcmV?d00001

diff --git a/tests/acpi-test-data/q35/DSDT.ipmibt b/tests/acpi-test-data/q35/DSDT.ipmibt
new file mode 100644
index 0000000000000000000000000000000000000000..3db2b0b5f96e567d42d3abc672c95e9724243aaf
GIT binary patch
literal 8340
zcmb7JO>Y~=8J;C6YBeOKrL>miuZU2Kq)BT>wj8(UM__XKX>+ADNjnK>fR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p?SY5)KL

literal 0
HcmV?d00001

-- 
MST
diff mbox

Patch

diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
index 16d11aa..92c90dd 100644
--- a/tests/bios-tables-test.c
+++ b/tests/bios-tables-test.c
@@ -49,6 +49,8 @@  typedef struct {
     GArray *tables;
     uint32_t smbios_ep_addr;
     struct smbios_21_entry_point smbios_ep_table;
+    uint8_t *required_struct_types;
+    int required_struct_types_len;
 } test_data;
 
 #define ACPI_READ_FIELD(field, addr)           \
@@ -334,7 +336,7 @@  static void test_acpi_tables(test_data *data)
     for (i = 0; i < tables_nr; i++) {
         AcpiSdtTable ssdt_table;
 
-        memset(&ssdt_table, 0 , sizeof(ssdt_table));
+        memset(&ssdt_table, 0, sizeof(ssdt_table));
         uint32_t addr = data->rsdt_tables_addr[i + 1]; /* fadt is first */
         test_dst_table(&ssdt_table, addr);
         g_array_append_val(data->tables, ssdt_table);
@@ -661,7 +663,6 @@  static void test_smbios_structs(test_data *data)
     uint32_t addr = ep_table->structure_table_address;
     int i, len, max_len = 0;
     uint8_t type, prv, crt;
-    uint8_t required_struct_types[] = {0, 1, 3, 4, 16, 17, 19, 32, 127};
 
     /* walk the smbios tables */
     for (i = 0; i < ep_table->number_of_structures; i++) {
@@ -701,8 +702,8 @@  static void test_smbios_structs(test_data *data)
     g_assert_cmpuint(ep_table->max_structure_size, ==, max_len);
 
     /* required struct types must all be present */
-    for (i = 0; i < ARRAY_SIZE(required_struct_types); i++) {
-        g_assert(test_bit(required_struct_types[i], struct_bitmap));
+    for (i = 0; i < data->required_struct_types_len; i++) {
+        g_assert(test_bit(data->required_struct_types[i], struct_bitmap));
     }
 }
 
@@ -742,6 +743,10 @@  static void test_acpi_one(const char *params, test_data *data)
     g_free(args);
 }
 
+static uint8_t base_required_struct_types[] = {
+    0, 1, 3, 4, 16, 17, 19, 32, 127
+};
+
 static void test_acpi_piix4_tcg(void)
 {
     test_data data;
@@ -751,6 +756,8 @@  static void test_acpi_piix4_tcg(void)
      */
     memset(&data, 0, sizeof(data));
     data.machine = MACHINE_PC;
+    data.required_struct_types = base_required_struct_types;
+    data.required_struct_types_len = ARRAY_SIZE(base_required_struct_types);
     test_acpi_one("-machine accel=tcg", &data);
     free_test_data(&data);
 }
@@ -762,6 +769,8 @@  static void test_acpi_piix4_tcg_bridge(void)
     memset(&data, 0, sizeof(data));
     data.machine = MACHINE_PC;
     data.variant = ".bridge";
+    data.required_struct_types = base_required_struct_types;
+    data.required_struct_types_len = ARRAY_SIZE(base_required_struct_types);
     test_acpi_one("-machine accel=tcg -device pci-bridge,chassis_nr=1", &data);
     free_test_data(&data);
 }
@@ -772,6 +781,8 @@  static void test_acpi_q35_tcg(void)
 
     memset(&data, 0, sizeof(data));
     data.machine = MACHINE_Q35;
+    data.required_struct_types = base_required_struct_types;
+    data.required_struct_types_len = ARRAY_SIZE(base_required_struct_types);
     test_acpi_one("-machine q35,accel=tcg", &data);
     free_test_data(&data);
 }
@@ -783,11 +794,50 @@  static void test_acpi_q35_tcg_bridge(void)
     memset(&data, 0, sizeof(data));
     data.machine = MACHINE_Q35;
     data.variant = ".bridge";
+    data.required_struct_types = base_required_struct_types;
+    data.required_struct_types_len = ARRAY_SIZE(base_required_struct_types);
     test_acpi_one("-machine q35,accel=tcg -device pci-bridge,chassis_nr=1",
                   &data);
     free_test_data(&data);
 }
 
+static uint8_t ipmi_required_struct_types[] = {
+    0, 1, 3, 4, 16, 17, 19, 32, 38, 127
+};
+
+static void test_acpi_q35_tcg_ipmi(void)
+{
+    test_data data;
+
+    memset(&data, 0, sizeof(data));
+    data.machine = MACHINE_Q35;
+    data.variant = ".ipmibt";
+    data.required_struct_types = ipmi_required_struct_types;
+    data.required_struct_types_len = ARRAY_SIZE(ipmi_required_struct_types);
+    test_acpi_one("-machine q35,accel=tcg -device ipmi-bmc-sim,id=bmc0"
+                  " -device isa-ipmi-bt,bmc=bmc0",
+                  &data);
+    free_test_data(&data);
+}
+
+static void test_acpi_piix4_tcg_ipmi(void)
+{
+    test_data data;
+
+    /* Supplying -machine accel argument overrides the default (qtest).
+     * This is to make guest actually run.
+     */
+    memset(&data, 0, sizeof(data));
+    data.machine = MACHINE_PC;
+    data.variant = ".ipmikcs";
+    data.required_struct_types = ipmi_required_struct_types;
+    data.required_struct_types_len = ARRAY_SIZE(ipmi_required_struct_types);
+    test_acpi_one("-machine accel=tcg -device ipmi-bmc-sim,id=bmc0"
+                  " -device isa-ipmi-kcs,irq=0,bmc=bmc0",
+                  &data);
+    free_test_data(&data);
+}
+
 int main(int argc, char *argv[])
 {
     const char *arch = qtest_get_arch();
@@ -804,6 +854,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/ipmi", test_acpi_piix4_tcg_ipmi);
+        qtest_add_func("acpi/q35/tcg/ipmi", test_acpi_q35_tcg_ipmi);
     }
     ret = g_test_run();
     boot_sector_cleanup(disk);