On 13/08/2025 18.48, Vladimir Sementsov-Ogievskiy wrote:
Allow to specify non default vm for the command.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@yandex-team.ru>
---
  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)
def get_qemu_img(test):
      test.log.debug('Looking for and selecting a qemu-img binary')

Reviewed-by: Thomas Huth <th...@redhat.com>


Reply via email to