]> git.proxmox.com Git - mirror_qemu.git/commitdiff
numa: Make deprecation warnings conditional on !qtest_enabled()
authorEduardo Habkost <ehabkost@redhat.com>
Tue, 2 Jul 2019 21:57:26 +0000 (18:57 -0300)
committerEduardo Habkost <ehabkost@redhat.com>
Fri, 5 Jul 2019 20:12:45 +0000 (17:12 -0300)
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>

hw/core/numa.c

index dd5c6e23349d47531a4c194d86136f8cfbd29d3b..2d984b025bdb7b4c8096a2eac11662760745a330 100644 (file)
@@ -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;