qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org,
	Richard Henderson <richard.henderson@linaro.org>,
	Peter Maydell <peter.maydell@linaro.org>
Cc: Ahmed Abouzied <email@aabouzied.com>,
	Philippe Mathieu-Daude <philmd@redhat.com>,
	Wainer dos Santos Moschetta <wainersm@redhat.com>
Subject: [PULL 7/7] tests/avocado: Allow overwrite smp and memory size command line options
Date: Wed, 20 Apr 2022 12:33:09 +0200	[thread overview]
Message-ID: <20220420103309.264479-8-thuth@redhat.com> (raw)
In-Reply-To: <20220420103309.264479-1-thuth@redhat.com>

From: Ahmed Abouzied <email@aabouzied.com>

Removes the hard-coded values in setUp(). Class inheriting from
avocado_qemu.LinuxTest can overwrite the default smp and memory instead.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/453
Signed-off-by: Ahmed Abouzied <email@aabouzied.com>
Message-Id: <20210802222257.50946-1-email@aabouzied.com>
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/avocado/avocado_qemu/__init__.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/avocado/avocado_qemu/__init__.py b/tests/avocado/avocado_qemu/__init__.py
index ac85e36a4d..39f15c1d51 100644
--- a/tests/avocado/avocado_qemu/__init__.py
+++ b/tests/avocado/avocado_qemu/__init__.py
@@ -516,6 +516,8 @@ class LinuxTest(LinuxSSHMixIn, QemuSystemTest):
     distro = None
     username = 'root'
     password = 'password'
+    smp = '2'
+    memory = '1024'
 
     def _set_distro(self):
         distro_name = self.params.get(
@@ -546,8 +548,8 @@ def _set_distro(self):
     def setUp(self, ssh_pubkey=None, network_device_type='virtio-net'):
         super().setUp()
         self._set_distro()
-        self.vm.add_args('-smp', '2')
-        self.vm.add_args('-m', '1024')
+        self.vm.add_args('-smp', self.smp)
+        self.vm.add_args('-m', self.memory)
         # The following network device allows for SSH connections
         self.vm.add_args('-netdev', 'user,id=vnet,hostfwd=:127.0.0.1:0-:22',
                          '-device', '%s,netdev=vnet' % network_device_type)
-- 
2.27.0



  parent reply	other threads:[~2022-04-20 10:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-20 10:33 [PULL 0/7] Misc patches Thomas Huth
2022-04-20 10:33 ` [PULL 1/7] tests: Drop perl-Test-Harness from the CI containers / VMs Thomas Huth
2022-04-20 10:33 ` [PULL 2/7] tests/qtest: Enable more tests for the "mipsel" target Thomas Huth
2022-04-20 10:33 ` [PULL 3/7] tests/qtest: Move the fuzz tests to x86 only Thomas Huth
2022-04-20 10:33 ` [PULL 4/7] tests/qtest: properly initialise the vring used idx Thomas Huth
2022-04-20 10:33 ` [PULL 5/7] docs/ccid: convert to restructuredText Thomas Huth
2022-04-20 10:33 ` [PULL 6/7] hw: Add compat machines for 7.1 Thomas Huth
2022-04-20 10:33 ` Thomas Huth [this message]
2022-04-20 16:38 ` [PULL 0/7] Misc patches Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220420103309.264479-8-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=email@aabouzied.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=wainersm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).