diff options
author | Eduardo Habkost | 2019-07-02 23:57:26 +0200 |
---|---|---|
committer | Eduardo Habkost | 2019-07-05 22:12:45 +0200 |
commit | f8123f2275d27c44fe523b36a039ca4739e5bbfe (patch) | |
tree | e7d1a090e3a5aee9e6160fd29b13e4f272d304e0 /hw/core/numa.c | |
parent | i386: Add Cascadelake-Server-v2 CPU model (diff) | |
download | qemu-f8123f2275d27c44fe523b36a039ca4739e5bbfe.tar.gz qemu-f8123f2275d27c44fe523b36a039ca4739e5bbfe.tar.xz qemu-f8123f2275d27c44fe523b36a039ca4739e5bbfe.zip |
numa: Make deprecation warnings conditional on !qtest_enabled()
This will help us avoid spurious warnings during "make check".
Note that this will silence the warnings generated by
tests/numa-test, but not the ones generated by
tests/bios-tables-test. We still need to change
tests/bios-tables-test to use "-numa ...,memdev=" to silence
these warnings.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20190702215726.23661-1-ehabkost@redhat.com>
Diffstat (limited to 'hw/core/numa.c')
-rw-r--r-- | hw/core/numa.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/hw/core/numa.c b/hw/core/numa.c index dd5c6e2334..2d984b025b 100644 --- a/hw/core/numa.c +++ b/hw/core/numa.c @@ -31,6 +31,7 @@ #include "qapi/error.h" #include "qapi/opts-visitor.h" #include "qapi/qapi-visit-machine.h" +#include "sysemu/qtest.h" #include "hw/mem/pc-dimm.h" #include "hw/mem/memory-device.h" #include "qemu/option.h" @@ -118,8 +119,10 @@ static void parse_numa_node(MachineState *ms, NumaNodeOptions *node, if (node->has_mem) { numa_info[nodenr].node_mem = node->mem; - warn_report("Parameter -numa node,mem is deprecated," - " use -numa node,memdev instead"); + if (!qtest_enabled()) { + warn_report("Parameter -numa node,mem is deprecated," + " use -numa node,memdev instead"); + } } if (node->has_memdev) { Object *o; @@ -405,9 +408,11 @@ void numa_complete_configuration(MachineState *ms) if (i == nb_numa_nodes) { assert(mc->numa_auto_assign_ram); mc->numa_auto_assign_ram(mc, numa_info, nb_numa_nodes, ram_size); - warn_report("Default splitting of RAM between nodes is deprecated," - " Use '-numa node,memdev' to explictly define RAM" - " allocation per node"); + if (!qtest_enabled()) { + warn_report("Default splitting of RAM between nodes is deprecated," + " Use '-numa node,memdev' to explictly define RAM" + " allocation per node"); + } } numa_total = 0; |