diff mbox

[v3] hw/acpi-build: Fix SRAT memory building when there is no memory in node0

Message ID 6d8a9fae-fce8-c739-3e23-293cd201b91f@cn.fujitsu.com
State New
Headers show

Commit Message

Dou Liyang Aug. 21, 2017, 11:23 a.m. UTC
Hi, Igor

[...]
>>
>> Ok, I will do it right now.
>
> see commit 6b9c1dd2c for example of adding test case,
> currently test has base SRAT tables that is reused by all tests.
> When you create testcase that produces different SRAT table,
> 'make check' will print warnings that ables do not match
> you can add "V=1" env. var. 'make V=1 check' to get detailed
> diff of what's changed.
>
> also see how 'test_data.variant' is handled to get idea how to use
> it to differentiate specific test case vs shared ACPI tables baseline blobs.
>

Thanks for teaching me that, it's very helpful to me.

Except for adding a new case, can we except memhp testcase with
node RAM check? just like following shows:



Thanks,
	dou.

Comments

Igor Mammedov Aug. 21, 2017, 1:25 p.m. UTC | #1
On Mon, 21 Aug 2017 19:23:35 +0800
Dou Liyang <douly.fnst@cn.fujitsu.com> wrote:

> Hi, Igor
> 
> [...]
> >>
> >> Ok, I will do it right now.  
> >
> > see commit 6b9c1dd2c for example of adding test case,
> > currently test has base SRAT tables that is reused by all tests.
> > When you create testcase that produces different SRAT table,
> > 'make check' will print warnings that ables do not match
> > you can add "V=1" env. var. 'make V=1 check' to get detailed
> > diff of what's changed.
> >
> > also see how 'test_data.variant' is handled to get idea how to use
> > it to differentiate specific test case vs shared ACPI tables baseline blobs.
> >  
> 
> Thanks for teaching me that, it's very helpful to me.
> 
> Except for adding a new case, can we except memhp testcase with
> node RAM check? just like following shows:
then you'll lose SRAT with even distribution between nodes.
Just add an additional variant for your usecase.

> 
> diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
> index 564da45..c79ece4 100644
> --- a/tests/bios-tables-test.c
> +++ b/tests/bios-tables-test.c
> @@ -788,7 +788,7 @@ static void test_acpi_q35_tcg_memhp(void)
>       data.machine = MACHINE_Q35;
>       data.variant = ".memhp";
>       test_acpi_one(" -m 128,slots=3,maxmem=1G"
> -                  " -numa node -numa node"
> +                  " -numa node -numa node,mem=128"
>                     " -numa dist,src=0,dst=1,val=21",
>                     &data);
>       free_test_data(&data);
> @@ -802,7 +802,7 @@ static void test_acpi_piix4_tcg_memhp(void)
>       data.machine = MACHINE_PC;
>       data.variant = ".memhp";
>       test_acpi_one(" -m 128,slots=3,maxmem=1G"
> -                  " -numa node -numa node"
> +                  " -numa node -numa node,mem=128"
>                     " -numa dist,src=0,dst=1,val=21",
>                     &data);
>       free_test_data(&data);
> 
> 
> Thanks,
> 	dou.
> 
>
diff mbox

Patch

diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
index 564da45..c79ece4 100644
--- a/tests/bios-tables-test.c
+++ b/tests/bios-tables-test.c
@@ -788,7 +788,7 @@  static void test_acpi_q35_tcg_memhp(void)
      data.machine = MACHINE_Q35;
      data.variant = ".memhp";
      test_acpi_one(" -m 128,slots=3,maxmem=1G"
-                  " -numa node -numa node"
+                  " -numa node -numa node,mem=128"
                    " -numa dist,src=0,dst=1,val=21",
                    &data);
      free_test_data(&data);
@@ -802,7 +802,7 @@  static void test_acpi_piix4_tcg_memhp(void)
      data.machine = MACHINE_PC;
      data.variant = ".memhp";
      test_acpi_one(" -m 128,slots=3,maxmem=1G"
-                  " -numa node -numa node"
+                  " -numa node -numa node,mem=128"
                    " -numa dist,src=0,dst=1,val=21",
                    &data);
      free_test_data(&data);