[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 6/8] Acceptance tests: prevent shutdown on non-specific targe

From: Wainer dos Santos Moschetta
Subject: Re: [PATCH 6/8] Acceptance tests: prevent shutdown on non-specific target tests
Date: Mon, 19 Apr 2021 16:07:35 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0


On 4/15/21 6:51 PM, Cleber Rosa wrote:
When running tests that are not target specific with various target
binaries, some specific behavior appears.  For s390x, when there's no
guest code running, it will produce GUEST_PANICKED events as the
firmware will shutdown the machine.

With this change, no GUEST_PANICKED *event* will be generated.

For some QMP commands, such as "query-migrate", a proper response
("guest-panicked" for the s390x target) will still be given.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
  tests/acceptance/migration.py | 4 ++--
  tests/acceptance/version.py   | 2 +-
  2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py
index 25ee55f36a..b4d46becc6 100644
--- a/tests/acceptance/migration.py
+++ b/tests/acceptance/migration.py
@@ -46,12 +46,12 @@ def assert_migration(self, src_vm, dst_vm):
def do_migrate(self, dest_uri, src_uri=None):
          dest_vm = self.get_vm('-incoming', dest_uri)
-        dest_vm.add_args('-nodefaults')
+        dest_vm.add_args('-nodefaults', '-no-shutdown')

On the other hand, can't that new argument introduce unwanted behavior on other targets? Maybe the argument should be set only for s390 because we know it prevents the test failure on that target only.

- Wainer

          if src_uri is None:
              src_uri = dest_uri
          source_vm = self.get_vm()
-        source_vm.add_args('-nodefaults')
+        source_vm.add_args('-nodefaults', '-no-shutdown')
          response = source_vm.qmp('migrate', uri=src_uri)
          if 'error' in response:
diff --git a/tests/acceptance/version.py b/tests/acceptance/version.py
index 79b923d4fc..3cf18c9878 100644
--- a/tests/acceptance/version.py
+++ b/tests/acceptance/version.py
@@ -17,7 +17,7 @@ class Version(Test):
      :avocado: tags=quick
      def test_qmp_human_info_version(self):
-        self.vm.add_args('-nodefaults')
+        self.vm.add_args('-nodefaults', '-no-shutdown')
          res = self.vm.command('human-monitor-command',
                                command_line='info version')

reply via email to

[Prev in Thread] Current Thread [Next in Thread]