All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
To: Brian Cain <brian.cain@oss.qualcomm.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH for-12.0 1/1] tests/functional/hexagon: run the rest of the tests
Date: Thu, 3 Dec 2026 09:09:24 -0800	[thread overview]
Message-ID: <2f330bb3-e9ba-45dd-a889-2a209b243d88@oss.qualcomm.com> (raw)
In-Reply-To: <20ce2c6f-630b-411c-8f22-f9ff367390f0@oss.qualcomm.com>

On 12/2/2026 5:30 PM, Brian Cain wrote:
> 
> On 12/2/2026 3:44 PM, Pierrick Bouvier wrote:
>> On 12/1/2026 11:48 AM, Brian Cain wrote:
>>> The arch and systest tarballs carry more binaries than were being run.
>>> Run the missing test cases, and add a Linux boot test for the QCS6490
>>> CDSP machine.
>>>
>>> With this many tests in the one file, a busy host sometimes stalled the
>>> whole file until the test timeout.  The guest starts to print to the
>>> console as soon as it is launched, and does so with the BQL held.  If
>>> the
>>> test has not started to read the console by the time the socket is full,
>>> the guest blocks holding the BQL.  QMP is answered by the main loop,
>>> which
>>> needs the BQL, so the test cannot get a reply to a QMP command until it
>>> reads the console, and it cannot read the console while it waits for the
>>> reply.  Start the guest paused, and read the console while it is
>>> resumed.
>>>
>>> Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
>>> ---
>>>   tests/functional/hexagon/meson.build        |   2 +
>>>   tests/functional/hexagon/test_arch_tests.py |  96 +++++++-
>>>   tests/functional/hexagon/test_linux.py      |  62 +++++
>>>   tests/functional/hexagon/test_systests.py   | 240 +++++++++++++++++++-
>>>   4 files changed, 394 insertions(+), 6 deletions(-)
>>>   create mode 100755 tests/functional/hexagon/test_linux.py
>>>
>>> diff --git a/tests/functional/hexagon/meson.build b/tests/functional/
>>> hexagon/meson.build
>>> index 3dd40ed0463..565a056a951 100644
>>> --- a/tests/functional/hexagon/meson.build
>>> +++ b/tests/functional/hexagon/meson.build
>>> @@ -5,6 +5,7 @@ tests_hexagon_system_thorough = [
>>>     'qcom_dsp_firmware',
>>>     'systests',
>>>     'hlx',
>>> +  'linux',
>>>     'minivm',
>>>   ]
>>>   @@ -13,4 +14,5 @@ test_hexagon_timeouts = {
>>>     'qcom_dsp_firmware': 240,
>>>     'systests': 180,
>>>     'hlx': 180,
>>> +  'linux': 240,
>>>   }
>>> diff --git a/tests/functional/hexagon/test_arch_tests.py b/tests/
>>> functional/hexagon/test_arch_tests.py
>>> index a437e4d4aac..9f8835e0614 100755
>>> --- a/tests/functional/hexagon/test_arch_tests.py
>>> +++ b/tests/functional/hexagon/test_arch_tests.py
>>> @@ -4,6 +4,8 @@
>>>   #
>>>   # SPDX-License-Identifier: GPL-2.0-or-later
>>>   +import threading
>>> +
>>>   from qemu_test import QemuSystemTest, Asset
>>>   from qemu_test.cmd import wait_for_console_pattern
>>>   @@ -32,6 +34,23 @@ class ArchTestsUart(QemuSystemTest):
>>>           "64053b31e8e3acf7c97e7e82209b6bda",
>>>       )
>>>   +    def launch_and_wait_for_pass(self) -> None:
>>> +        """
>>> +        Run the guest until it prints PASS on the console.
>>> +
>>> +        Start the guest paused and read the console while resuming
>>> it, so
>>> +        that a guest blocked on a full console socket cannot
>>> deadlock QMP.
>>> +        """
>>> +        self.vm.add_args("-S")
>>> +        self.vm.launch()
>>> +        resume = threading.Thread(target=self.vm.cmd, args=("cont",),
>>> +                                  daemon=True)
>>> +        resume.start()
>> This looks like a genuine race condition in test framework, no?
>> I wonder if it should be the default for vm.launch().
> 
> I felt like that would change the general testing too much to make it
> the default to start halted.
> 
> IIUC Hexagon is the first/only architecture using semihosting for many
> functional tests and that could be a factor in why we're uniquely
> encountering this.  Then again, it might be plausible that a fast enough
> guest could cause a similar issue with a UART.
>

Fair enough.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>

Regards,
Pierrick


      reply	other threads:[~2026-12-03 17:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01 19:48 [PATCH for-12.0 0/1] Hexagon: systests + linux boot test Brian Cain
2026-12-01 19:48 ` [PATCH for-12.0 1/1] tests/functional/hexagon: run the rest of the tests Brian Cain
2026-12-02 21:44   ` Pierrick Bouvier
2026-12-03  1:30     ` Brian Cain
2026-12-03 17:09       ` Pierrick Bouvier [this message]

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=2f330bb3-e9ba-45dd-a889-2a209b243d88@oss.qualcomm.com \
    --to=pierrick.bouvier@oss.qualcomm.com \
    --cc=brian.cain@oss.qualcomm.com \
    --cc=qemu-devel@nongnu.org \
    /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.