tests: use -numa memdev option in tests instead of legacy 'mem' option

it will test preferred memdev option more extensively and remove
undesired deprecation warnings during 'make check'

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20190702140745.27767-3-imammedo@redhat.com>
[ehabkost: remove numa-test.c changes]
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
Igor Mammedov 2019-07-02 10:07:45 -04:00 committed by Eduardo Habkost
parent b69239e085
commit af135030e3

View File

@ -688,6 +688,8 @@ static void test_acpi_q35_tcg_mmio64(void)
};
test_acpi_one("-m 128M,slots=1,maxmem=2G "
"-object memory-backend-ram,id=ram0,size=128M "
"-numa node,memdev=ram0 "
"-device pci-testdev,membar=2G",
&data);
free_test_data(&data);
@ -701,7 +703,9 @@ static void test_acpi_piix4_tcg_cphp(void)
data.machine = MACHINE_PC;
data.variant = ".cphp";
test_acpi_one("-smp 2,cores=3,sockets=2,maxcpus=6"
" -numa node -numa node"
" -object memory-backend-ram,id=ram0,size=64M"
" -object memory-backend-ram,id=ram1,size=64M"
" -numa node,memdev=ram0 -numa node,memdev=ram1"
" -numa dist,src=0,dst=1,val=21",
&data);
free_test_data(&data);
@ -715,7 +719,9 @@ static void test_acpi_q35_tcg_cphp(void)
data.machine = MACHINE_Q35;
data.variant = ".cphp";
test_acpi_one(" -smp 2,cores=3,sockets=2,maxcpus=6"
" -numa node -numa node"
" -object memory-backend-ram,id=ram0,size=64M"
" -object memory-backend-ram,id=ram1,size=64M"
" -numa node,memdev=ram0 -numa node,memdev=ram1"
" -numa dist,src=0,dst=1,val=21",
&data);
free_test_data(&data);
@ -766,7 +772,9 @@ 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"
" -object memory-backend-ram,id=ram0,size=64M"
" -object memory-backend-ram,id=ram1,size=64M"
" -numa node,memdev=ram0 -numa node,memdev=ram1"
" -numa dist,src=0,dst=1,val=21",
&data);
free_test_data(&data);
@ -780,7 +788,9 @@ 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"
" -object memory-backend-ram,id=ram0,size=64M"
" -object memory-backend-ram,id=ram1,size=64M"
" -numa node,memdev=ram0 -numa node,memdev=ram1"
" -numa dist,src=0,dst=1,val=21",
&data);
free_test_data(&data);
@ -793,7 +803,8 @@ static void test_acpi_q35_tcg_numamem(void)
memset(&data, 0, sizeof(data));
data.machine = MACHINE_Q35;
data.variant = ".numamem";
test_acpi_one(" -numa node -numa node,mem=128", &data);
test_acpi_one(" -object memory-backend-ram,id=ram0,size=128M"
" -numa node -numa node,memdev=ram0", &data);
free_test_data(&data);
}
@ -804,7 +815,8 @@ static void test_acpi_piix4_tcg_numamem(void)
memset(&data, 0, sizeof(data));
data.machine = MACHINE_PC;
data.variant = ".numamem";
test_acpi_one(" -numa node -numa node,mem=128", &data);
test_acpi_one(" -object memory-backend-ram,id=ram0,size=128M"
" -numa node -numa node,memdev=ram0", &data);
free_test_data(&data);
}
@ -818,17 +830,21 @@ static void test_acpi_tcg_dimm_pxm(const char *machine)
test_acpi_one(" -machine nvdimm=on,nvdimm-persistence=cpu"
" -smp 4,sockets=4"
" -m 128M,slots=3,maxmem=1G"
" -numa node,mem=32M,nodeid=0"
" -numa node,mem=32M,nodeid=1"
" -numa node,mem=32M,nodeid=2"
" -numa node,mem=32M,nodeid=3"
" -object memory-backend-ram,id=ram0,size=32M"
" -object memory-backend-ram,id=ram1,size=32M"
" -object memory-backend-ram,id=ram2,size=32M"
" -object memory-backend-ram,id=ram3,size=32M"
" -numa node,memdev=ram0,nodeid=0"
" -numa node,memdev=ram1,nodeid=1"
" -numa node,memdev=ram2,nodeid=2"
" -numa node,memdev=ram3,nodeid=3"
" -numa cpu,node-id=0,socket-id=0"
" -numa cpu,node-id=1,socket-id=1"
" -numa cpu,node-id=2,socket-id=2"
" -numa cpu,node-id=3,socket-id=3"
" -object memory-backend-ram,id=ram0,size=128M"
" -object memory-backend-ram,id=ram4,size=128M"
" -object memory-backend-ram,id=nvm0,size=128M"
" -device pc-dimm,id=dimm0,memdev=ram0,node=1"
" -device pc-dimm,id=dimm0,memdev=ram4,node=1"
" -device nvdimm,id=dimm1,memdev=nvm0,node=2",
&data);
free_test_data(&data);