All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Stefan Hajnoczi" <stefanha@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Gustavo Romero" <gustavo.romero@linaro.org>,
	"Daniel P. Berrangé" <berrange@redhat.com>
Subject: [PULL 31/31] tests/functional: Mark main in QemuBaseTest class as a static method
Date: Wed, 27 Aug 2025 09:54:41 +0200	[thread overview]
Message-ID: <20250827075443.559712-32-thuth@redhat.com> (raw)
In-Reply-To: <20250827075443.559712-1-thuth@redhat.com>

From: Gustavo Romero <gustavo.romero@linaro.org>

The main() method in the QemuBaseTest class has no parameters but is
defined as a regular method. Currently, this does not cause any issues
because in the functional tests main() is always called directly from
QemuBaseTest (never from instances), but the way this method is defined
makes its signature wrong, implying a 'self'. Hence, it's best practice
to define such a method as a static method, so decorate it with
@staticmethod.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Message-ID: <20250819143916.4138035-4-gustavo.romero@linaro.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/functional/qemu_test/testcase.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu_test/testcase.py
index 5caf7b13fe3..fbeb1710587 100644
--- a/tests/functional/qemu_test/testcase.py
+++ b/tests/functional/qemu_test/testcase.py
@@ -235,6 +235,7 @@ def tearDown(self):
         self.log.removeHandler(self._log_fh)
         self._log_fh.close()
 
+    @staticmethod
     def main():
         warnings.simplefilter("default")
         os.environ["PYTHONWARNINGS"] = "default"
-- 
2.50.1



  parent reply	other threads:[~2025-08-27  7:57 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-27  7:54 [PULL 00/31] First pull request with functional tests patches for QEMU 10.2 Thomas Huth
2025-08-27  7:54 ` [PULL 01/31] hw: add compat machines for 10.2 Thomas Huth
2025-08-27  7:54 ` [PULL 02/31] CI: Use mingw-w64-x86_64-curl-winssl instead of mingw-w64-x86_64-curl for Windows build Thomas Huth
2025-08-27  7:54 ` [PULL 03/31] tests/functional/test_aarch64_virt_gpu: Skip test if EGL won't initialize Thomas Huth
2025-08-27  7:54 ` [PULL 04/31] tests/functional: Fix reverse_debugging asset precaching Thomas Huth
2025-08-27  7:54 ` [PULL 05/31] tests/functional: Use more fine-grained locking when looking for free ports Thomas Huth
2025-08-27  7:54 ` [PULL 06/31] tests/functional: Rework the migration test to have target-specific files Thomas Huth
2025-08-27  7:54 ` [PULL 07/31] tests/functional: Rework the multiprocess " Thomas Huth
2025-08-27  7:54 ` [PULL 08/31] tests/functional/meson.build: Split timeout settings by target Thomas Huth
2025-08-27  7:54 ` [PULL 09/31] tests/functional/meson.build: Allow tests to reside in subfolders Thomas Huth
2025-08-27  7:54 ` [PULL 10/31] tests/functional: Move aarch64 tests into architecture specific folder Thomas Huth
2025-08-27  7:54 ` [PULL 11/31] tests/functional: Move alpha " Thomas Huth
2025-08-27  7:54 ` [PULL 12/31] tests/functional: Move arm " Thomas Huth
2025-08-27  7:54 ` [PULL 13/31] tests/functional: Move avr " Thomas Huth
2025-08-27  7:54 ` [PULL 14/31] tests/functional: Move hppa " Thomas Huth
2025-08-27  7:54 ` [PULL 15/31] tests/functional: Move i386 " Thomas Huth
2025-08-27  7:54 ` [PULL 16/31] tests/functional: Move loongarch64 " Thomas Huth
2025-08-27  7:54 ` [PULL 17/31] tests/functional: Move m68k " Thomas Huth
2025-08-27  7:54 ` [PULL 18/31] tests/functional: Move microblaze " Thomas Huth
2025-08-27  7:54 ` [PULL 19/31] tests/functional: Move mips tests into target-specific folders Thomas Huth
2025-08-27  7:54 ` [PULL 20/31] tests/functional: Move or1k " Thomas Huth
2025-08-27  7:54 ` [PULL 21/31] tests/functional: Move ppc/ppc64 " Thomas Huth
2025-08-27  7:54 ` [PULL 22/31] tests/functional: Move riscv32/riscv64 " Thomas Huth
2025-08-27  7:54 ` [PULL 23/31] tests/functional: Move rx test " Thomas Huth
2025-08-27  7:54 ` [PULL 24/31] tests/functional: Move s390x tests " Thomas Huth
2025-08-27  7:54 ` [PULL 25/31] tests/functional: Move sh4/sh4eb " Thomas Huth
2025-08-27  7:54 ` [PULL 26/31] tests/functional: Move sparc/sparc64 " Thomas Huth
2025-08-27  7:54 ` [PULL 27/31] tests/functional: Move x86_64 tests into target-specific folder Thomas Huth
2025-08-27  7:54 ` [PULL 28/31] tests/functional: Move xtensa " Thomas Huth
2025-08-27  7:54 ` [PULL 29/31] tests/functional: Move the generic tests to a subfolder Thomas Huth
2025-08-27  7:54 ` [PULL 30/31] MAINTAINERS: Adjust wildcards for the migration, multiprocess and replay tests Thomas Huth
2025-08-27  7:54 ` Thomas Huth [this message]
2025-08-27 20:26 ` [PULL 00/31] First pull request with functional tests patches for QEMU 10.2 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=20250827075443.559712-32-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=berrange@redhat.com \
    --cc=gustavo.romero@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=stefanha@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.