From: "Daniel P. Berrangé" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Thomas Huth" <thuth@redhat.com>,
"Harsh Prateek Bora" <harshpb@linux.ibm.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Daniel Henrique Barboza" <danielhb413@gmail.com>,
"Nicholas Piggin" <npiggin@gmail.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
qemu-ppc@nongnu.org
Subject: [PATCH v2 2/7] tests/functional: set 'qemu_bin' as an object level field
Date: Fri, 28 Feb 2025 10:27:33 +0000 [thread overview]
Message-ID: <20250228102738.3064045-3-berrange@redhat.com> (raw)
In-Reply-To: <20250228102738.3064045-1-berrange@redhat.com>
The 'qemu_bin' field is currently set on the class, despite being
accessed as if it were an object instance field with 'self.qemu_bin'.
This is no obvious need to have it as a class field, so move it into
the object instance.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
docs/devel/testing/functional.rst | 2 +-
tests/functional/qemu_test/testcase.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/devel/testing/functional.rst b/docs/devel/testing/functional.rst
index ecc738922b..bcb5509512 100644
--- a/docs/devel/testing/functional.rst
+++ b/docs/devel/testing/functional.rst
@@ -173,7 +173,7 @@ QEMU binary selection
^^^^^^^^^^^^^^^^^^^^^
The QEMU binary used for the ``self.vm`` QEMUMachine instance will
-primarily depend on the value of the ``qemu_bin`` class attribute.
+primarily depend on the value of the ``qemu_bin`` instance attribute.
If it is not explicitly set by the test code, its default value will
be the result the QEMU_TEST_QEMU_BINARY environment variable.
diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu_test/testcase.py
index 9d5611c4d7..058bf270ec 100644
--- a/tests/functional/qemu_test/testcase.py
+++ b/tests/functional/qemu_test/testcase.py
@@ -33,7 +33,6 @@
class QemuBaseTest(unittest.TestCase):
- qemu_bin = os.getenv('QEMU_TEST_QEMU_BINARY')
arch = None
workdir = None
@@ -193,6 +192,7 @@ def assets_available(self):
return True
def setUp(self):
+ self.qemu_bin = os.getenv('QEMU_TEST_QEMU_BINARY')
self.assertIsNotNone(self.qemu_bin, 'QEMU_TEST_QEMU_BINARY must be set')
self.arch = self.qemu_bin.split('-')[-1]
self.socketdir = None
--
2.48.1
next prev parent reply other threads:[~2025-02-28 10:31 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-28 10:27 [PATCH v2 0/7] tests/functional: a few misc cleanups and fixes Daniel P. Berrangé
2025-02-28 10:27 ` [PATCH v2 1/7] tests/functional: remove unused 'bin_prefix' variable Daniel P. Berrangé
2025-02-28 16:52 ` Richard Henderson
2025-02-28 10:27 ` Daniel P. Berrangé [this message]
2025-02-28 16:53 ` [PATCH v2 2/7] tests/functional: set 'qemu_bin' as an object level field Richard Henderson
2025-02-28 10:27 ` [PATCH v2 3/7] tests/functional: remove all class level fields Daniel P. Berrangé
2025-02-28 16:53 ` Richard Henderson
2025-03-05 11:51 ` Thomas Huth
2025-03-05 11:55 ` Daniel P. Berrangé
2025-02-28 10:27 ` [PATCH v2 4/7] tests/functional: reduce tuxrun maxmem to work on 32-bit hosts Daniel P. Berrangé
2025-02-28 16:54 ` Richard Henderson
2025-03-05 8:59 ` Thomas Huth
2025-02-28 10:27 ` [PATCH v2 5/7] tests/functional: skip memaddr tests on 32-bit builds Daniel P. Berrangé
2025-02-28 17:06 ` Richard Henderson
2025-03-05 9:02 ` Thomas Huth
2025-03-05 11:32 ` Thomas Huth
2025-03-05 11:45 ` Daniel P. Berrangé
2025-02-28 10:27 ` [PATCH v2 6/7] tests/functional: drop unused 'get_tag' method Daniel P. Berrangé
2025-03-05 9:04 ` Thomas Huth
2025-02-28 10:27 ` [PATCH v2 7/7] tests/functional: stop output from zstd command when uncompressing Daniel P. Berrangé
2025-03-05 9:05 ` Thomas Huth
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=20250228102738.3064045-3-berrange@redhat.com \
--to=berrange@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=danielhb413@gmail.com \
--cc=harshpb@linux.ibm.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=npiggin@gmail.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=thuth@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).