diff mbox series

[PATCH-for-4.2,v11,11/11] tests: Add bios tests to arm/virt

Message ID 20190918130633.4872-12-shameerali.kolothum.thodi@huawei.com (mailing list archive)
State New, archived
Headers show
Series ARM virt: ACPI memory hotplug support | expand

Commit Message

Shameerali Kolothum Thodi Sept. 18, 2019, 1:06 p.m. UTC
This adds numamem and memhp tests for arm/virt platform.

Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
---
v10-->v11

Added Igor's R-by.

In order to avoid "make check" failure, the files listed in patch #10
has to be added to tests/data/acpi/virt folder before this patch.
---
 tests/bios-tables-test.c | 49 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

Comments

Michael S. Tsirkin Sept. 25, 2019, 3:26 p.m. UTC | #1
On Wed, Sep 18, 2019 at 02:06:33PM +0100, Shameer Kolothum wrote:
> This adds numamem and memhp tests for arm/virt platform.
> 
> Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
> v10-->v11
> 
> Added Igor's R-by.
> 
> In order to avoid "make check" failure, the files listed in patch #10
> has to be added to tests/data/acpi/virt folder before this patch.

So you can just add empty stubs.

> ---
>  tests/bios-tables-test.c | 49 ++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 49 insertions(+)
> 
> diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
> index 9b3d8b0d1b..6d9e2e41b0 100644
> --- a/tests/bios-tables-test.c
> +++ b/tests/bios-tables-test.c
> @@ -870,6 +870,53 @@ static void test_acpi_piix4_tcg_dimm_pxm(void)
>      test_acpi_tcg_dimm_pxm(MACHINE_PC);
>  }
>  
> +static void test_acpi_virt_tcg_memhp(void)
> +{
> +    test_data data = {
> +        .machine = "virt",
> +        .accel = "tcg",
> +        .uefi_fl1 = "pc-bios/edk2-aarch64-code.fd",
> +        .uefi_fl2 = "pc-bios/edk2-arm-vars.fd",
> +        .cd = "tests/data/uefi-boot-images/bios-tables-test.aarch64.iso.qcow2",
> +        .ram_start = 0x40000000ULL,
> +        .scan_len = 256ULL * 1024 * 1024,
> +    };
> +
> +    data.variant = ".memhp";
> +    test_acpi_one(" -cpu cortex-a57"
> +                  " -m 256M,slots=3,maxmem=1G"
> +                  " -object memory-backend-ram,id=ram0,size=128M"
> +                  " -object memory-backend-ram,id=ram1,size=128M"
> +                  " -numa node,memdev=ram0 -numa node,memdev=ram1"
> +                  " -numa dist,src=0,dst=1,val=21",
> +                  &data);
> +
> +    free_test_data(&data);
> +
> +}
> +
> +static void test_acpi_virt_tcg_numamem(void)
> +{
> +    test_data data = {
> +        .machine = "virt",
> +        .accel = "tcg",
> +        .uefi_fl1 = "pc-bios/edk2-aarch64-code.fd",
> +        .uefi_fl2 = "pc-bios/edk2-arm-vars.fd",
> +        .cd = "tests/data/uefi-boot-images/bios-tables-test.aarch64.iso.qcow2",
> +        .ram_start = 0x40000000ULL,
> +        .scan_len = 128ULL * 1024 * 1024,
> +    };
> +
> +    data.variant = ".numamem";
> +    test_acpi_one(" -cpu cortex-a57"
> +                  " -object memory-backend-ram,id=ram0,size=128M"
> +                  " -numa node,memdev=ram0",
> +                  &data);
> +
> +    free_test_data(&data);
> +
> +}
> +
>  static void test_acpi_virt_tcg(void)
>  {
>      test_data data = {
> @@ -916,6 +963,8 @@ int main(int argc, char *argv[])
>          qtest_add_func("acpi/q35/dimmpxm", test_acpi_q35_tcg_dimm_pxm);
>      } else if (strcmp(arch, "aarch64") == 0) {
>          qtest_add_func("acpi/virt", test_acpi_virt_tcg);
> +        qtest_add_func("acpi/virt/numamem", test_acpi_virt_tcg_numamem);
> +        qtest_add_func("acpi/virt/memhp", test_acpi_virt_tcg_memhp);
>      }
>      ret = g_test_run();
>      boot_sector_cleanup(disk);
> -- 
> 2.17.1
>
Igor Mammedov Sept. 25, 2019, 5:36 p.m. UTC | #2
On Wed, 25 Sep 2019 11:26:04 -0400
"Michael S. Tsirkin" <mst@redhat.com> wrote:

> On Wed, Sep 18, 2019 at 02:06:33PM +0100, Shameer Kolothum wrote:
> > This adds numamem and memhp tests for arm/virt platform.
> > 
> > Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
> > Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> > ---
> > v10-->v11
> > 
> > Added Igor's R-by.
> > 
> > In order to avoid "make check" failure, the files listed in patch #10
> > has to be added to tests/data/acpi/virt folder before this patch.
> 
> So you can just add empty stubs.

Wouldn't IASL choke on such files?

> 
> > ---
> >  tests/bios-tables-test.c | 49 ++++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 49 insertions(+)
> > 
> > diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
> > index 9b3d8b0d1b..6d9e2e41b0 100644
> > --- a/tests/bios-tables-test.c
> > +++ b/tests/bios-tables-test.c
> > @@ -870,6 +870,53 @@ static void test_acpi_piix4_tcg_dimm_pxm(void)
> >      test_acpi_tcg_dimm_pxm(MACHINE_PC);
> >  }
> >  
> > +static void test_acpi_virt_tcg_memhp(void)
> > +{
> > +    test_data data = {
> > +        .machine = "virt",
> > +        .accel = "tcg",
> > +        .uefi_fl1 = "pc-bios/edk2-aarch64-code.fd",
> > +        .uefi_fl2 = "pc-bios/edk2-arm-vars.fd",
> > +        .cd = "tests/data/uefi-boot-images/bios-tables-test.aarch64.iso.qcow2",
> > +        .ram_start = 0x40000000ULL,
> > +        .scan_len = 256ULL * 1024 * 1024,
> > +    };
> > +
> > +    data.variant = ".memhp";
> > +    test_acpi_one(" -cpu cortex-a57"
> > +                  " -m 256M,slots=3,maxmem=1G"
> > +                  " -object memory-backend-ram,id=ram0,size=128M"
> > +                  " -object memory-backend-ram,id=ram1,size=128M"
> > +                  " -numa node,memdev=ram0 -numa node,memdev=ram1"
> > +                  " -numa dist,src=0,dst=1,val=21",
> > +                  &data);
> > +
> > +    free_test_data(&data);
> > +
> > +}
> > +
> > +static void test_acpi_virt_tcg_numamem(void)
> > +{
> > +    test_data data = {
> > +        .machine = "virt",
> > +        .accel = "tcg",
> > +        .uefi_fl1 = "pc-bios/edk2-aarch64-code.fd",
> > +        .uefi_fl2 = "pc-bios/edk2-arm-vars.fd",
> > +        .cd = "tests/data/uefi-boot-images/bios-tables-test.aarch64.iso.qcow2",
> > +        .ram_start = 0x40000000ULL,
> > +        .scan_len = 128ULL * 1024 * 1024,
> > +    };
> > +
> > +    data.variant = ".numamem";
> > +    test_acpi_one(" -cpu cortex-a57"
> > +                  " -object memory-backend-ram,id=ram0,size=128M"
> > +                  " -numa node,memdev=ram0",
> > +                  &data);
> > +
> > +    free_test_data(&data);
> > +
> > +}
> > +
> >  static void test_acpi_virt_tcg(void)
> >  {
> >      test_data data = {
> > @@ -916,6 +963,8 @@ int main(int argc, char *argv[])
> >          qtest_add_func("acpi/q35/dimmpxm", test_acpi_q35_tcg_dimm_pxm);
> >      } else if (strcmp(arch, "aarch64") == 0) {
> >          qtest_add_func("acpi/virt", test_acpi_virt_tcg);
> > +        qtest_add_func("acpi/virt/numamem", test_acpi_virt_tcg_numamem);
> > +        qtest_add_func("acpi/virt/memhp", test_acpi_virt_tcg_memhp);
> >      }
> >      ret = g_test_run();
> >      boot_sector_cleanup(disk);
> > -- 
> > 2.17.1
> > 
>
diff mbox series

Patch

diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
index 9b3d8b0d1b..6d9e2e41b0 100644
--- a/tests/bios-tables-test.c
+++ b/tests/bios-tables-test.c
@@ -870,6 +870,53 @@  static void test_acpi_piix4_tcg_dimm_pxm(void)
     test_acpi_tcg_dimm_pxm(MACHINE_PC);
 }
 
+static void test_acpi_virt_tcg_memhp(void)
+{
+    test_data data = {
+        .machine = "virt",
+        .accel = "tcg",
+        .uefi_fl1 = "pc-bios/edk2-aarch64-code.fd",
+        .uefi_fl2 = "pc-bios/edk2-arm-vars.fd",
+        .cd = "tests/data/uefi-boot-images/bios-tables-test.aarch64.iso.qcow2",
+        .ram_start = 0x40000000ULL,
+        .scan_len = 256ULL * 1024 * 1024,
+    };
+
+    data.variant = ".memhp";
+    test_acpi_one(" -cpu cortex-a57"
+                  " -m 256M,slots=3,maxmem=1G"
+                  " -object memory-backend-ram,id=ram0,size=128M"
+                  " -object memory-backend-ram,id=ram1,size=128M"
+                  " -numa node,memdev=ram0 -numa node,memdev=ram1"
+                  " -numa dist,src=0,dst=1,val=21",
+                  &data);
+
+    free_test_data(&data);
+
+}
+
+static void test_acpi_virt_tcg_numamem(void)
+{
+    test_data data = {
+        .machine = "virt",
+        .accel = "tcg",
+        .uefi_fl1 = "pc-bios/edk2-aarch64-code.fd",
+        .uefi_fl2 = "pc-bios/edk2-arm-vars.fd",
+        .cd = "tests/data/uefi-boot-images/bios-tables-test.aarch64.iso.qcow2",
+        .ram_start = 0x40000000ULL,
+        .scan_len = 128ULL * 1024 * 1024,
+    };
+
+    data.variant = ".numamem";
+    test_acpi_one(" -cpu cortex-a57"
+                  " -object memory-backend-ram,id=ram0,size=128M"
+                  " -numa node,memdev=ram0",
+                  &data);
+
+    free_test_data(&data);
+
+}
+
 static void test_acpi_virt_tcg(void)
 {
     test_data data = {
@@ -916,6 +963,8 @@  int main(int argc, char *argv[])
         qtest_add_func("acpi/q35/dimmpxm", test_acpi_q35_tcg_dimm_pxm);
     } else if (strcmp(arch, "aarch64") == 0) {
         qtest_add_func("acpi/virt", test_acpi_virt_tcg);
+        qtest_add_func("acpi/virt/numamem", test_acpi_virt_tcg_numamem);
+        qtest_add_func("acpi/virt/memhp", test_acpi_virt_tcg_memhp);
     }
     ret = g_test_run();
     boot_sector_cleanup(disk);