qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gustavo Romero <gustavo.romero@linaro.org>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: Thomas Huth <thuth@redhat.com>,
	qemu-devel@nongnu.org, alex.bennee@linaro.org,
	qemu-arm@nongnu.org, manos.pitsidianakis@linaro.org,
	peter.maydell@linaro.org
Subject: Re: [PATCH v4 1/9] tests/functional: Re-activate the check-venv target
Date: Fri, 26 Sep 2025 13:02:26 -0300	[thread overview]
Message-ID: <d0f10230-11f8-480b-9b54-d7c146fbe732@linaro.org> (raw)
In-Reply-To: <aNa1iV7XZ-BSeX88@redhat.com>

Hi Daniel,

On 9/26/25 12:47, Daniel P. Berrangé wrote:
> On Fri, Sep 26, 2025 at 12:44:58PM -0300, Gustavo Romero wrote:
>> Hi Daniel,
>>
>> On 9/26/25 05:50, Daniel P. Berrangé wrote:
>>> On Fri, Sep 26, 2025 at 10:42:22AM +0200, Thomas Huth wrote:
>>>> On 26/09/2025 10.37, Daniel P. Berrangé wrote:
>>>>> On Fri, Sep 26, 2025 at 10:34:01AM +0200, Thomas Huth wrote:
>>>>>> On 26/09/2025 07.15, Gustavo Romero wrote:
>>>>>>> Add check-venv target as a dependency for the functional tests. This
>>>>>>> causes Python modules listed in pythondeps.toml, under the testdeps
>>>>>>> group, to be installed when 'make check-functional' is executed to
>>>>>>> prepare and run the functional tests.
>>>>>>>
>>>>>>> Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
>>>>>>> Suggested-by: Thomas Huth <thuth@redhat.com>
>>>>>>> ---
>>>>>>>      tests/Makefile.include | 2 +-
>>>>>>>      1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>>>
>>>>>>> diff --git a/tests/Makefile.include b/tests/Makefile.include
>>>>>>> index 3538c0c740..d012a9b25d 100644
>>>>>>> --- a/tests/Makefile.include
>>>>>>> +++ b/tests/Makefile.include
>>>>>>> @@ -109,7 +109,7 @@ $(FUNCTIONAL_TARGETS):
>>>>>>>      	@$(MAKE) SPEED=thorough $(subst -functional,-func,$@)
>>>>>>>      .PHONY: check-functional
>>>>>>> -check-functional:
>>>>>>> +check-functional: check-venv
>>>>>>
>>>>>> I just noticed that there's still a problem: If you run "make
>>>>>> check-functional-aarch64" immediately after configuring + compiling QEMU in
>>>>>> a fresh folder for the first time, the functional tests fail with:
>>>>>>
>>>>>> ModuleNotFoundError: No module named 'pygdbmi'
>>>>>>
>>>>>> We either need to add dependencies to the check-functional-<arch> targets,
>>>>>> too, or we have to make sure that tests still get properly skipped in the
>>>>>> case that pygdbmi has not been installed into the venv yet.
>>>>>
>>>>> We already have a decorator for skipping tests when modules are missing,
>>>>> so we should add usage of that.
>>>>
>>>> Ack ... and the "from .gdb import GDB" in qemu_test/__init__.py likely also
>>>> has to go away, to avoid that each and every test tries to pull in the gdb
>>>> code.
>>>
>>> Or alternatively the gdb module can move the gdbmi import so that it is
>>> only referenced in method scope, so it becomes relevant only when
>>> executed.
>>
>> I can´t follow what you meant here. Do mind expanding on it a bit?
> 
> The code currently does:
> 
>    from pygdbmi.gdbcontroller import GdbController
> 
>    class GDB:
>        def __init__(self, gdb_path, echo=True, suffix='# ', prompt="$ "):
>            gdb_cmd = [gdb_path, "-q", "--interpreter=mi2"]
>            self.gdbmi = GdbController(gdb_cmd)
>            self.echo = echo
> 
> but it could instead do
> 
>    class GDB:
>        def __init__(self, gdb_path, echo=True, suffix='# ', prompt="$ "):
>            gdb_cmd = [gdb_path, "-q", "--interpreter=mi2"]
>            from pygdbmi.gdbcontroller import GdbController
>            self.gdbmi = GdbController(gdb_cmd)
>            self.echo = echo
> 
> 
> so pygdbmi is only required if the GDB classs is instantiated
> by a test, not when 'gdb.py' is imported

ah, got it. Thanks for clarification ;)


Cheers,
Gustavo


  reply	other threads:[~2025-09-26 16:04 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-26  5:15 [PATCH v4 0/9] tests/functional: Adapt reverse_debugging to run w/o Avocado Gustavo Romero
2025-09-26  5:15 ` [PATCH v4 1/9] tests/functional: Re-activate the check-venv target Gustavo Romero
2025-09-26  6:28   ` Thomas Huth
2025-09-26  8:34   ` Thomas Huth
2025-09-26  8:37     ` Daniel P. Berrangé
2025-09-26  8:42       ` Thomas Huth
2025-09-26  8:50         ` Daniel P. Berrangé
2025-09-26 15:44           ` Gustavo Romero
2025-09-26 15:47             ` Daniel P. Berrangé
2025-09-26 16:02               ` Gustavo Romero [this message]
2025-09-26 15:43     ` Gustavo Romero
2025-09-29  6:26       ` Thomas Huth
2025-09-29  6:29         ` Thomas Huth
2025-09-26  5:15 ` [PATCH v4 2/9] python: Install pygdbmi in meson's venv Gustavo Romero
2025-09-26  6:28   ` Thomas Huth
2025-09-26  5:15 ` [PATCH v4 3/9] tests/functional: Provide GDB to the functional tests Gustavo Romero
2025-09-26 10:03   ` Thomas Huth
2025-09-26 18:08     ` Gustavo Romero
2025-09-26 18:15       ` Gustavo Romero
2025-09-29  6:34         ` Thomas Huth
2025-09-29  8:03           ` Daniel P. Berrangé
2025-09-26  5:15 ` [PATCH v4 4/9] tests/functional: Add GDB class Gustavo Romero
2025-09-26  7:05   ` Thomas Huth
2025-09-26  5:15 ` [PATCH v4 5/9] tests/functional: replace avocado process with subprocess Gustavo Romero
2025-09-26  7:10   ` Thomas Huth
2025-09-26  5:15 ` [PATCH v4 6/9] tests/functional: drop datadrainer class in reverse debugging Gustavo Romero
2025-09-26  7:13   ` Thomas Huth
2025-09-26  5:15 ` [PATCH v4 7/9] tests/functional: Add decorator to skip test on missing env vars Gustavo Romero
2025-09-26  7:20   ` Thomas Huth
2025-09-26  5:15 ` [PATCH v4 8/9] tests/functional: Adapt reverse_debugging to run w/o Avocado Gustavo Romero
2025-09-26  8:44   ` Thomas Huth
2025-09-26 16:00     ` Gustavo Romero
2025-09-29  6:24       ` Thomas Huth
2025-09-26  5:15 ` [PATCH v4 9/9] tests/functional: Adapt arches to reverse_debugging " Gustavo Romero
2025-09-26  9:09   ` Thomas Huth
2025-09-26  6:49 ` [PATCH v4 0/9] tests/functional: Adapt reverse_debugging to run " Philippe Mathieu-Daudé
2025-09-26  9:14   ` Thomas Huth
2025-09-26  9:32     ` Philippe Mathieu-Daudé
2025-09-26  9:41       ` Daniel P. Berrangé
2025-09-26  9:42       ` 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=d0f10230-11f8-480b-9b54-d7c146fbe732@linaro.org \
    --to=gustavo.romero@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=berrange@redhat.com \
    --cc=manos.pitsidianakis@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@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).