summary refs log tree commit diff stats
path: root/tests/vm/basevm.py
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2022-07-19 13:05:06 +0100
committerPeter Maydell <peter.maydell@linaro.org>2022-07-19 13:05:06 +0100
commitda7da9d5e608200ecc0749ff37be246e9cd3314f (patch)
tree18a7ed5f1e57dab0b5bd9e86337bbdcab1b84c75 /tests/vm/basevm.py
parentf9d9fff72eed03acde97ea2d66104748dc474b2e (diff)
parent9b0ecfaba5920ddf8601d7b31746a428aa3779c6 (diff)
downloadfocaccia-qemu-da7da9d5e608200ecc0749ff37be246e9cd3314f.tar.gz
focaccia-qemu-da7da9d5e608200ecc0749ff37be246e9cd3314f.zip
Merge tag 'pull-request-2022-07-19' of https://gitlab.com/thuth/qemu into staging
* Clean up tests/vm (remove obsolte VMs, upgrade Ubuntu 18.04 to 20.04 etc.)
* Fix broken build on Haiku
* Replace the term 'whitelist' in some files with a better one
* Some other minor test related fixes

# gpg: Signature made Tue 19 Jul 2022 07:55:26 BST
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg:                issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* tag 'pull-request-2022-07-19' of https://gitlab.com/thuth/qemu:
  python/qemu/qmp/legacy: Replace 'returns-whitelist' with the correct type
  util: Fix broken build on Haiku
  Replace 'whitelist' with 'allow'
  tests/unit: Replace g_memdup() by g_memdup2()
  qtest/machine-none: Add LoongArch support
  tests/vm: Remove docker cross-compile test from CentOS VM
  tests/vm: add 1GB extra memory per core
  tests/vm: remove duplicate 'centos' VM test
  tests/vm: remove ubuntu.i386 VM test
  tests/vm: upgrade Ubuntu 18.04 VM to 20.04
  tests/vm: switch centos.aarch64 to CentOS 8 Stream
  tests/vm: switch CentOS 8 to CentOS 8 Stream
  tests/vm: use 'cp' instead of 'ln' for temporary vm images
  qga: treat get-guest-fsinfo as "best effort"

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests/vm/basevm.py')
-rw-r--r--tests/vm/basevm.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
index d7d0413df3..4fd9af10b7 100644
--- a/tests/vm/basevm.py
+++ b/tests/vm/basevm.py
@@ -99,6 +99,11 @@ class BaseVM(object):
         self._source_path = args.source_path
         # Allow input config to override defaults.
         self._config = DEFAULT_CONFIG.copy()
+
+        # 1GB per core, minimum of 4. This is only a default.
+        mem = max(4, args.jobs)
+        self._config['memory'] = f"{mem}G"
+
         if config != None:
             self._config.update(config)
         self.validate_ssh_keys()