test: use modern qemu numa arguments
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>
Tue, 15 Dec 2020 11:05:14 +0000 (12:05 +0100)
committerMichael Biebl <biebl@debian.org>
Mon, 18 Jan 2021 12:45:15 +0000 (12:45 +0000)
commit77ed2a79351b74c4a698fd7dfa7d7b3e0472ca7c
treec7b882ac7b59299097f3c4928275f0902f522acd
parent6cd3ded9570ed2789c8cc6bee7ca28901f5ed85a
test: use modern qemu numa arguments

Upgrading to qemu 5.2 breaks TEST-36-NUMAPOLICY like:
  qemu-system-x86_64: total memory for NUMA nodes (0x0) should
  equal RAM size (0x20000000)

Use the new (as in >=2014) form of memdev in test 36:
 -object memory-backend-ram,id=mem0,size=512M -numa node,memdev=mem0,nodeid=0

Since some target systems are as old as qemu 1.5.3 (CentOS7) but the new
kind to specify was added in qemu 2.1 this needs to add version parsing and
add the argument only when qemu is >=5.2.

Fixes #17986.

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
(cherry picked from commit 43b49470d1f2808555c07f64cd0a1529b7ddd559)

Gbp-Pq: Name test-use-modern-qemu-numa-arguments.patch
test/TEST-36-NUMAPOLICY/test.sh
test/test-functions