On 09.09.25 17:03, Thomas Huth wrote:
On 05/09/2025 15.50, Vladimir Sementsov-Ogievskiy wrote:
Allow to specify non default vm for the command.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@yandex-team.ru>
Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>
Reviewed-by: Thomas Huth <th...@redhat.com>
---
  tests/functional/qemu_test/cmd.py | 7 +++++--
  1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tests/functional/qemu_test/cmd.py 
b/tests/functional/qemu_test/cmd.py
index dc5f422b77..28b36a3a54 100644
--- a/tests/functional/qemu_test/cmd.py
+++ b/tests/functional/qemu_test/cmd.py
@@ -172,7 +172,8 @@ def exec_command(test, command):
      _console_interaction(test, None, None, command + '\r')
  def exec_command_and_wait_for_pattern(test, command,
-                                      success_message, failure_message=None):
+                                      success_message, failure_message=None,
+                                      vm=None):
      """
      Send a command to a console (appending CRLF characters), then wait
      for success_message to appear on the console, while logging the.
@@ -184,9 +185,11 @@ def exec_command_and_wait_for_pattern(test, command,
      :param command: the command to send
      :param success_message: if this message appears, test succeeds
      :param failure_message: if this message appears, test fails
+    :param vm: the VM to use (defaults to test.vm if None)
      """
      assert success_message
-    _console_interaction(test, success_message, failure_message, command + 
'\r')
+    _console_interaction(test, success_message, failure_message, command + 
'\r',
+                         vm=vm)

  Hi,

FYI, there was another patch on the list that does something very similar, and 
I picked it for my pull request today (since it fixed some more spots):

  https://lore.kernel.org/qemu-devel/20250909135147.612345-20-th...@redhat.com/

... so once that got merged, you can likely drop this patch from your series.


Good, thanks!


--
Best regards,
Vladimir

Reply via email to