From: Frantisek Sumsal Date: Mon, 14 Jun 2021 13:45:03 +0000 (+0200) Subject: test: correctly configure the NUMA node memory pool X-Git-Tag: v249-rc1~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=785256a3201c71763f18e4c8dce5476e69707d24;p=thirdparty%2Fsystemd.git test: correctly configure the NUMA node memory pool The currently hardcoded value works with the default configuration, but breaks when QEMU_MEM != 512M (in sanitizer runs, for example). ``` # QEMU_MEM=1G make -C test/TEST-36-NUMAPOLICY/ run make: Entering directory '/home/fsumsal/repos/@systemd/systemd/test/TEST-36-NUMAPOLICY' TEST-36-NUMAPOLICY RUN: test NUMAPolicy= and NUMAMask= options + /bin/qemu-kvm -smp 8 -net none -m 1G -nographic -kernel /boot/vmlinuz-5.12.5-300.fc34.x86_64 -drive format=raw' qemu-kvm: total memory for NUMA nodes (0x20000000) should equal RAM size (0x40000000) E: QEMU failed with exit code 1 ``` --- diff --git a/test/TEST-36-NUMAPOLICY/test.sh b/test/TEST-36-NUMAPOLICY/test.sh index f1c36b3d6b6..fddd5b67275 100755 --- a/test/TEST-36-NUMAPOLICY/test.sh +++ b/test/TEST-36-NUMAPOLICY/test.sh @@ -8,7 +8,7 @@ TEST_NO_NSPAWN=1 . "${TEST_BASE_DIR:?}/test-functions" if qemu_min_version "5.2.0"; then - QEMU_OPTIONS="-object memory-backend-ram,id=mem0,size=512M -numa node,memdev=mem0,nodeid=0" + QEMU_OPTIONS="-object memory-backend-ram,id=mem0,size=${QEMU_MEM:?QEMU_MEM is unset} -numa node,memdev=mem0,nodeid=0" else QEMU_OPTIONS="-numa node,nodeid=0" fi