Skip to content

Commit

Permalink
numa: Skip invalidation of cluster and NUMA node boundary for qtest
Browse files Browse the repository at this point in the history
There are warning messages printed from tests/qtest/numa-test.c,
to complain the CPU cluster and NUMA node boundary is broken. Since
the broken boundary is expected, we don't want to see the warning
messages.

  # cd /home/gavin/sandbox/qemu.main/build
  # MALLOC_PERTURB_=255 QTEST_QEMU_BINARY=./qemu-system-aarch64           \
    G_TEST_DBUS_DAEMON=../tests/dbus-vmstate-daemon.sh                    \
    QTEST_QEMU_IMG=./qemu-img                                             \
    QTEST_QEMU_STORAGE_DAEMON_BINARY=./storage-daemon/qemu-storage-daemon \
    tests/qtest/numa-test --tap -k
      :
    qemu-system-aarch64: warning: CPU-0 and CPU-4 in socket-0-cluster-0   \
    have been associated with node-0 and node-1 respectively.             \
    It can cause OSes like Linux to misbehave
      :

Skip the invalidation of CPU cluster and NUMA node boundary when
qtest is enabled, to avoid the warning messages.

Fixes: a494fdb ("numa: Validate cluster and NUMA node boundary if required")
Signed-off-by: Gavin Shan <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
  • Loading branch information
Gavin Shan authored and pm215 committed Jan 12, 2024
1 parent 3fab43d commit 393d5c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hw/core/machine.c
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,7 @@ static void validate_cpu_cluster_to_numa_boundary(MachineState *ms)
const CPUArchId *cpus = possible_cpus->cpus;
int i, j;

if (state->num_nodes <= 1 || possible_cpus->len <= 1) {
if (qtest_enabled() || state->num_nodes <= 1 || possible_cpus->len <= 1) {
return;
}

Expand Down

0 comments on commit 393d5c5

Please sign in to comment.