All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] --disable-tcg avocado fixes for ppc-softmmu
@ 2022-03-10 18:30 Daniel Henrique Barboza
  2022-03-10 18:30 ` [PATCH 1/9] avocado/boot_linux_console.py: check TCG accel in test_ppc_g3beige() Daniel Henrique Barboza
                   ` (10 more replies)
  0 siblings, 11 replies; 13+ messages in thread
From: Daniel Henrique Barboza @ 2022-03-10 18:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: farosas, Daniel Henrique Barboza, qemu-ppc, clg, muriloo, david

Hi,

These are more test fixes that I missed from my first series [1]. Thanks
Murilo Opsfelder and Fabiano for letting me know that we still had broken
tests to deal with.

All these tests were either a case of 'this needs kvm_pr' or 'this needs
kvm_hv'. Since avocado doesn't have yet a way of detecting if the host
is running kvm_hv or kvm_pr, the workaround for now is to skip them if
TCG isn't available.

[1] https://lists.gnu.org/archive/html/qemu-devel/2022-03/msg00866.html


Daniel Henrique Barboza (9):
  avocado/boot_linux_console.py: check TCG accel in test_ppc_g3beige()
  avocado/boot_linux_console.py: check TCG accel in test_ppc_mac99()
  avocado/ppc_405.py: remove test_ppc_taihu()
  avocado/ppc_405.py: check TCG accel in test_ppc_ref405ep()
  avocado/ppc_74xx.py: check TCG accel for all tests
  avocado/ppc_bamboo.py: check TCG accel in test_ppc_bamboo()
  avocado/ppc_mpc8544ds.py: check TCG accel in test_ppc_mpc8544ds()
  avocado/ppc_prep_40p.py: check TCG accel in all tests
  avocado/ppc_virtex_ml507.py: check TCG accel in
    test_ppc_virtex_ml507()

 tests/avocado/boot_linux_console.py | 12 ++++++++++++
 tests/avocado/ppc_405.py            | 10 ++--------
 tests/avocado/ppc_74xx.py           | 13 +++++++++++++
 tests/avocado/ppc_bamboo.py         |  2 ++
 tests/avocado/ppc_mpc8544ds.py      |  2 ++
 tests/avocado/ppc_prep_40p.py       |  6 ++++++
 tests/avocado/ppc_virtex_ml507.py   |  2 ++
 7 files changed, 39 insertions(+), 8 deletions(-)

-- 
2.35.1



^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 1/9] avocado/boot_linux_console.py: check TCG accel in test_ppc_g3beige()
  2022-03-10 18:30 [PATCH 0/9] --disable-tcg avocado fixes for ppc-softmmu Daniel Henrique Barboza
@ 2022-03-10 18:30 ` Daniel Henrique Barboza
  2022-03-10 18:30 ` [PATCH 2/9] avocado/boot_linux_console.py: check TCG accel in test_ppc_mac99() Daniel Henrique Barboza
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Daniel Henrique Barboza @ 2022-03-10 18:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: farosas, Daniel Henrique Barboza, qemu-ppc, clg, muriloo, david

This test breaks when run in an IBM POWER host with a QEMU compiled
with --disable-tcg and the ppc-softmmu target.

One thing to note is that the error message explictly mentions kvm_pr
support:

Command: ./qemu-system-ppc -display none -vga none (...)
-machine g3beige (...)
        Output: ioctl(KVM_CREATE_VM) failed: 22 Invalid argument
PPC KVM module is not loaded. Try modprobe kvm_pr.
qemu-system-ppc: failed to initialize kvm: Invalid argument

The host was running kvm_hv, not kvm_pr, and the machine failed to load.

Unfortunately we don't have a way to detect whether the KVM module loaded
is kvm_hv or kvm_pr - we do a check for /dev/kvm to detect KVM support but
both modules create this file so that's not helpful.

Let's skip this test for now until we have a way of detecting kvm_pr support in the host.

Reported-by: Murilo Opsfelder Araujo <muriloo@linux.ibm.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
 tests/avocado/boot_linux_console.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py
index 6d6e748572..2f8d8e2fe6 100644
--- a/tests/avocado/boot_linux_console.py
+++ b/tests/avocado/boot_linux_console.py
@@ -1213,7 +1213,13 @@ def test_ppc_g3beige(self):
         """
         :avocado: tags=arch:ppc
         :avocado: tags=machine:g3beige
+        :avocado: tags=accel:tcg
         """
+        # TODO: g3beige works with kvm_pr but we don't have a
+        # reliable way ATM (e.g. looking at /proc/modules) to detect
+        # whether we're running kvm_hv or kvm_pr. For now let's
+        # disable this test if we don't have TCG support.
+        self.require_accelerator("tcg")
         tar_hash = 'e0b872a5eb8fdc5bed19bd43ffe863900ebcedfc'
         self.vm.add_args('-M', 'graphics=off')
         self.do_test_advcal_2018('15', tar_hash, 'invaders.elf')
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 2/9] avocado/boot_linux_console.py: check TCG accel in test_ppc_mac99()
  2022-03-10 18:30 [PATCH 0/9] --disable-tcg avocado fixes for ppc-softmmu Daniel Henrique Barboza
  2022-03-10 18:30 ` [PATCH 1/9] avocado/boot_linux_console.py: check TCG accel in test_ppc_g3beige() Daniel Henrique Barboza
@ 2022-03-10 18:30 ` Daniel Henrique Barboza
  2022-03-10 18:30 ` [PATCH 3/9] avocado/ppc_405.py: remove test_ppc_taihu() Daniel Henrique Barboza
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Daniel Henrique Barboza @ 2022-03-10 18:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: farosas, Daniel Henrique Barboza, qemu-ppc, clg, muriloo, david

This test breaks when run in an IBM POWER host with a QEMU compiled
with --disable-tcg and the ppc-softmmu target in a similar manner as
test_ppc_g3beige did.

There's also an observation made about kvm_pr in the error message:

Command: ./qemu-system-ppc -display none -vga none (...)
-machine mac99 (...)
        Output: ioctl(KVM_CREATE_VM) failed: 22 Invalid argument
PPC KVM module is not loaded. Try modprobe kvm_pr.
qemu-system-ppc: failed to initialize kvm: Invalid argument

This means that, when/if we're able to detect kvm_pr support in these
avocado tests, we can revisit this test to not rely solely on TCG
availability.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
 tests/avocado/boot_linux_console.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py
index 2f8d8e2fe6..b40a3abc81 100644
--- a/tests/avocado/boot_linux_console.py
+++ b/tests/avocado/boot_linux_console.py
@@ -1228,7 +1228,13 @@ def test_ppc_mac99(self):
         """
         :avocado: tags=arch:ppc
         :avocado: tags=machine:mac99
+        :avocado: tags=accel:tcg
         """
+        # TODO: mac99 works with kvm_pr but we don't have a
+        # reliable way ATM (e.g. looking at /proc/modules) to detect
+        # whether we're running kvm_hv or kvm_pr. For now let's
+        # disable this test if we don't have TCG support.
+        self.require_accelerator("tcg")
         tar_hash = 'e0b872a5eb8fdc5bed19bd43ffe863900ebcedfc'
         self.vm.add_args('-M', 'graphics=off')
         self.do_test_advcal_2018('15', tar_hash, 'invaders.elf')
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 3/9] avocado/ppc_405.py: remove test_ppc_taihu()
  2022-03-10 18:30 [PATCH 0/9] --disable-tcg avocado fixes for ppc-softmmu Daniel Henrique Barboza
  2022-03-10 18:30 ` [PATCH 1/9] avocado/boot_linux_console.py: check TCG accel in test_ppc_g3beige() Daniel Henrique Barboza
  2022-03-10 18:30 ` [PATCH 2/9] avocado/boot_linux_console.py: check TCG accel in test_ppc_mac99() Daniel Henrique Barboza
@ 2022-03-10 18:30 ` Daniel Henrique Barboza
  2022-03-10 18:30 ` [PATCH 4/9] avocado/ppc_405.py: check TCG accel in test_ppc_ref405ep() Daniel Henrique Barboza
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Daniel Henrique Barboza @ 2022-03-10 18:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: farosas, Daniel Henrique Barboza, qemu-ppc, clg, muriloo, david

Running this test gives us a deprecation warning telling that this
machine type is no longer supported:

	Output: qemu-system-ppc: Machine type 'taihu' is deprecated:
incomplete, use 'ref405ep' instead

Moreover, this test fails to pass running in an IBM POWER host when
building QEMU with --disable-tcg.

Since the machine type is already being considered deprecated let's not
bother fixing the test with --disable-tcg. Remove test_ppc_taihu().

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
 tests/avocado/ppc_405.py | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/tests/avocado/ppc_405.py b/tests/avocado/ppc_405.py
index a47f89b934..a69b7c5e97 100644
--- a/tests/avocado/ppc_405.py
+++ b/tests/avocado/ppc_405.py
@@ -25,14 +25,6 @@ def do_test_ppc405(self):
         wait_for_console_pattern(self, 'AMCC PPC405EP Evaluation Board')
         exec_command_and_wait_for_pattern(self, 'reset', 'AMCC PowerPC 405EP')
 
-    def test_ppc_taihu(self):
-        """
-        :avocado: tags=arch:ppc
-        :avocado: tags=machine:taihu
-        :avocado: tags=cpu:405ep
-        """
-        self.do_test_ppc405()
-
     def test_ppc_ref405ep(self):
         """
         :avocado: tags=arch:ppc
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 4/9] avocado/ppc_405.py: check TCG accel in test_ppc_ref405ep()
  2022-03-10 18:30 [PATCH 0/9] --disable-tcg avocado fixes for ppc-softmmu Daniel Henrique Barboza
                   ` (2 preceding siblings ...)
  2022-03-10 18:30 ` [PATCH 3/9] avocado/ppc_405.py: remove test_ppc_taihu() Daniel Henrique Barboza
@ 2022-03-10 18:30 ` Daniel Henrique Barboza
  2022-03-10 18:30 ` [PATCH 5/9] avocado/ppc_74xx.py: check TCG accel for all tests Daniel Henrique Barboza
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Daniel Henrique Barboza @ 2022-03-10 18:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: farosas, Daniel Henrique Barboza, qemu-ppc, clg, muriloo, david

Running this test without TCG support in an IBM POWER server results
in the following error:

        Command: ./qemu-system-ppc -display none -vga none (...)
-machine ref405ep (...)
        Output: qemu-system-ppc: Register sync failed... If you're using
kvm-hv.ko, only "-cpu host" is possible
qemu-system-ppc: kvm_init_vcpu: kvm_arch_init_vcpu failed (0): Invalid argument

Although the host is running kvm_hv we don't have a way of differentiate
between kvm_hv and kvm_pr, meaning that this test would've failed in the
same way if kvm_pr was the KVM module loaded in the host.

Since we don't have a way of checking which KVM module is being loaded
when using avocado, make a TCG accel check in test_ppc_ref405ep().

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
 tests/avocado/ppc_405.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/avocado/ppc_405.py b/tests/avocado/ppc_405.py
index a69b7c5e97..4e7e01aa76 100644
--- a/tests/avocado/ppc_405.py
+++ b/tests/avocado/ppc_405.py
@@ -30,5 +30,7 @@ def test_ppc_ref405ep(self):
         :avocado: tags=arch:ppc
         :avocado: tags=machine:ref405ep
         :avocado: tags=cpu:405ep
+        :avocado: tags=accel:tcg
         """
+        self.require_accelerator("tcg")
         self.do_test_ppc405()
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 5/9] avocado/ppc_74xx.py: check TCG accel for all tests
  2022-03-10 18:30 [PATCH 0/9] --disable-tcg avocado fixes for ppc-softmmu Daniel Henrique Barboza
                   ` (3 preceding siblings ...)
  2022-03-10 18:30 ` [PATCH 4/9] avocado/ppc_405.py: check TCG accel in test_ppc_ref405ep() Daniel Henrique Barboza
@ 2022-03-10 18:30 ` Daniel Henrique Barboza
  2022-03-10 18:30 ` [PATCH 6/9] avocado/ppc_bamboo.py: check TCG accel in test_ppc_bamboo() Daniel Henrique Barboza
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Daniel Henrique Barboza @ 2022-03-10 18:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: farosas, Daniel Henrique Barboza, qemu-ppc, clg, muriloo, david

All tests of this file, when running in an IBM POWER host and with
--disable-tcg, fail in a similar manner:

        Command: ./qemu-system-ppc -display none -vga none (...)
-cpu 7400 (...)
        Output: ioctl(KVM_CREATE_VM) failed: 22 Invalid argument
PPC KVM module is not loaded. Try modprobe kvm_pr.
qemu-system-ppc: failed to initialize kvm: Invalid argument

We don't have a way of telling which KVM module is loaded in a Power
host (kvm_hv or kvm_pr). For now let's make all the tests of this
file depend on TCG support.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
 tests/avocado/ppc_74xx.py | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/tests/avocado/ppc_74xx.py b/tests/avocado/ppc_74xx.py
index 556a9a7da9..f54757c243 100644
--- a/tests/avocado/ppc_74xx.py
+++ b/tests/avocado/ppc_74xx.py
@@ -11,6 +11,7 @@
 class ppc74xxCpu(QemuSystemTest):
     """
     :avocado: tags=arch:ppc
+    :avocado: tags=accel:tcg
     """
     timeout = 5
 
@@ -18,6 +19,7 @@ def test_ppc_7400(self):
         """
         :avocado: tags=cpu:7400
         """
+        self.require_accelerator("tcg")
         self.vm.set_console()
         self.vm.launch()
         wait_for_console_pattern(self, '>> OpenBIOS')
@@ -27,6 +29,7 @@ def test_ppc_7410(self):
         """
         :avocado: tags=cpu:7410
         """
+        self.require_accelerator("tcg")
         self.vm.set_console()
         self.vm.launch()
         wait_for_console_pattern(self, '>> OpenBIOS')
@@ -36,6 +39,7 @@ def test_ppc_7441(self):
         """
         :avocado: tags=cpu:7441
         """
+        self.require_accelerator("tcg")
         self.vm.set_console()
         self.vm.launch()
         wait_for_console_pattern(self, '>> OpenBIOS')
@@ -45,6 +49,7 @@ def test_ppc_7445(self):
         """
         :avocado: tags=cpu:7445
         """
+        self.require_accelerator("tcg")
         self.vm.set_console()
         self.vm.launch()
         wait_for_console_pattern(self, '>> OpenBIOS')
@@ -54,6 +59,7 @@ def test_ppc_7447(self):
         """
         :avocado: tags=cpu:7447
         """
+        self.require_accelerator("tcg")
         self.vm.set_console()
         self.vm.launch()
         wait_for_console_pattern(self, '>> OpenBIOS')
@@ -63,6 +69,7 @@ def test_ppc_7447a(self):
         """
         :avocado: tags=cpu:7447a
         """
+        self.require_accelerator("tcg")
         self.vm.set_console()
         self.vm.launch()
         wait_for_console_pattern(self, '>> OpenBIOS')
@@ -72,6 +79,7 @@ def test_ppc_7448(self):
         """
         :avocado: tags=cpu:7448
         """
+        self.require_accelerator("tcg")
         self.vm.set_console()
         self.vm.launch()
         wait_for_console_pattern(self, '>> OpenBIOS')
@@ -81,6 +89,7 @@ def test_ppc_7450(self):
         """
         :avocado: tags=cpu:7450
         """
+        self.require_accelerator("tcg")
         self.vm.set_console()
         self.vm.launch()
         wait_for_console_pattern(self, '>> OpenBIOS')
@@ -90,6 +99,7 @@ def test_ppc_7451(self):
         """
         :avocado: tags=cpu:7451
         """
+        self.require_accelerator("tcg")
         self.vm.set_console()
         self.vm.launch()
         wait_for_console_pattern(self, '>> OpenBIOS')
@@ -99,6 +109,7 @@ def test_ppc_7455(self):
         """
         :avocado: tags=cpu:7455
         """
+        self.require_accelerator("tcg")
         self.vm.set_console()
         self.vm.launch()
         wait_for_console_pattern(self, '>> OpenBIOS')
@@ -108,6 +119,7 @@ def test_ppc_7457(self):
         """
         :avocado: tags=cpu:7457
         """
+        self.require_accelerator("tcg")
         self.vm.set_console()
         self.vm.launch()
         wait_for_console_pattern(self, '>> OpenBIOS')
@@ -117,6 +129,7 @@ def test_ppc_7457a(self):
         """
         :avocado: tags=cpu:7457a
         """
+        self.require_accelerator("tcg")
         self.vm.set_console()
         self.vm.launch()
         wait_for_console_pattern(self, '>> OpenBIOS')
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 6/9] avocado/ppc_bamboo.py: check TCG accel in test_ppc_bamboo()
  2022-03-10 18:30 [PATCH 0/9] --disable-tcg avocado fixes for ppc-softmmu Daniel Henrique Barboza
                   ` (4 preceding siblings ...)
  2022-03-10 18:30 ` [PATCH 5/9] avocado/ppc_74xx.py: check TCG accel for all tests Daniel Henrique Barboza
@ 2022-03-10 18:30 ` Daniel Henrique Barboza
  2022-03-10 18:30 ` [PATCH 7/9] avocado/ppc_mpc8544ds.py: check TCG accel in test_ppc_mpc8544ds() Daniel Henrique Barboza
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Daniel Henrique Barboza @ 2022-03-10 18:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: farosas, Daniel Henrique Barboza, qemu-ppc, clg, muriloo, david

This tests times out in an IBM POWER host when compiled with
--disable-tcg.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
 tests/avocado/ppc_bamboo.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/avocado/ppc_bamboo.py b/tests/avocado/ppc_bamboo.py
index 40629e3478..102ff252df 100644
--- a/tests/avocado/ppc_bamboo.py
+++ b/tests/avocado/ppc_bamboo.py
@@ -20,7 +20,9 @@ def test_ppc_bamboo(self):
         :avocado: tags=machine:bamboo
         :avocado: tags=cpu:440epb
         :avocado: tags=device:rtl8139
+        :avocado: tags=accel:tcg
         """
+        self.require_accelerator("tcg")
         tar_url = ('http://landley.net/aboriginal/downloads/binaries/'
                    'system-image-powerpc-440fp.tar.gz')
         tar_hash = '53e5f16414b195b82d2c70272f81c2eedb39bad9'
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 7/9] avocado/ppc_mpc8544ds.py: check TCG accel in test_ppc_mpc8544ds()
  2022-03-10 18:30 [PATCH 0/9] --disable-tcg avocado fixes for ppc-softmmu Daniel Henrique Barboza
                   ` (5 preceding siblings ...)
  2022-03-10 18:30 ` [PATCH 6/9] avocado/ppc_bamboo.py: check TCG accel in test_ppc_bamboo() Daniel Henrique Barboza
@ 2022-03-10 18:30 ` Daniel Henrique Barboza
  2022-03-10 18:30 ` [PATCH 8/9] avocado/ppc_prep_40p.py: check TCG accel in all tests Daniel Henrique Barboza
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: Daniel Henrique Barboza @ 2022-03-10 18:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: farosas, Daniel Henrique Barboza, qemu-ppc, clg, muriloo, david

This tests times out in an IBM POWER host when compiled with
--disable-tcg.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
 tests/avocado/ppc_mpc8544ds.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/avocado/ppc_mpc8544ds.py b/tests/avocado/ppc_mpc8544ds.py
index 886f967b15..8d6a749201 100644
--- a/tests/avocado/ppc_mpc8544ds.py
+++ b/tests/avocado/ppc_mpc8544ds.py
@@ -19,7 +19,9 @@ def test_ppc_mpc8544ds(self):
         """
         :avocado: tags=arch:ppc
         :avocado: tags=machine:mpc8544ds
+        :avocado: tags=accel:tcg
         """
+        self.require_accelerator("tcg")
         tar_url = ('https://www.qemu-advent-calendar.org'
                    '/2020/download/day17.tar.gz')
         tar_hash = '7a5239542a7c4257aa4d3b7f6ddf08fb6775c494'
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 8/9] avocado/ppc_prep_40p.py: check TCG accel in all tests
  2022-03-10 18:30 [PATCH 0/9] --disable-tcg avocado fixes for ppc-softmmu Daniel Henrique Barboza
                   ` (6 preceding siblings ...)
  2022-03-10 18:30 ` [PATCH 7/9] avocado/ppc_mpc8544ds.py: check TCG accel in test_ppc_mpc8544ds() Daniel Henrique Barboza
@ 2022-03-10 18:30 ` Daniel Henrique Barboza
  2022-03-10 22:37   ` Philippe Mathieu-Daudé
  2022-03-10 18:30 ` [PATCH 9/9] avocado/ppc_virtex_ml507.py: check TCG accel in test_ppc_virtex_ml507() Daniel Henrique Barboza
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 13+ messages in thread
From: Daniel Henrique Barboza @ 2022-03-10 18:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: farosas, Daniel Henrique Barboza, qemu-ppc, clg, muriloo, david

All tests in the file times out when running in an IBM POWER host and
--disable-tcg with an error like the following:

        Command: ./qemu-system-ppc -display none -vga none (...)
-machine 40p (...)
        Output: qemu-system-ppc: Register sync failed... If you're using
kvm-hv.ko, only "-cpu host" is possible
qemu-system-ppc: kvm_init_vcpu: kvm_arch_init_vcpu failed (0): Invalid argument

Since we don't have a way to detect whether the host is running kvm_hv
or kvm_pr, skip all tests if TCG is not available.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
 tests/avocado/ppc_prep_40p.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/avocado/ppc_prep_40p.py b/tests/avocado/ppc_prep_40p.py
index 4bd956584d..d4f1eb7e1d 100644
--- a/tests/avocado/ppc_prep_40p.py
+++ b/tests/avocado/ppc_prep_40p.py
@@ -28,7 +28,9 @@ def test_factory_firmware_and_netbsd(self):
         :avocado: tags=machine:40p
         :avocado: tags=os:netbsd
         :avocado: tags=slowness:high
+        :avocado: tags=accel:tcg
         """
+        self.require_accelerator("tcg")
         bios_url = ('http://ftpmirror.your.org/pub/misc/'
                     'ftp.software.ibm.com/rs6000/firmware/'
                     '7020-40p/P12H0456.IMG')
@@ -51,7 +53,9 @@ def test_openbios_192m(self):
         """
         :avocado: tags=arch:ppc
         :avocado: tags=machine:40p
+        :avocado: tags=accel:tcg
         """
+        self.require_accelerator("tcg")
         self.vm.set_console()
         self.vm.add_args('-m', '192') # test fw_cfg
 
@@ -65,7 +69,9 @@ def test_openbios_and_netbsd(self):
         :avocado: tags=arch:ppc
         :avocado: tags=machine:40p
         :avocado: tags=os:netbsd
+        :avocado: tags=accel:tcg
         """
+        self.require_accelerator("tcg")
         drive_url = ('https://archive.netbsd.org/pub/NetBSD-archive/'
                      'NetBSD-7.1.2/iso/NetBSD-7.1.2-prep.iso')
         drive_hash = 'ac6fa2707d888b36d6fa64de6e7fe48e'
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 9/9] avocado/ppc_virtex_ml507.py: check TCG accel in test_ppc_virtex_ml507()
  2022-03-10 18:30 [PATCH 0/9] --disable-tcg avocado fixes for ppc-softmmu Daniel Henrique Barboza
                   ` (7 preceding siblings ...)
  2022-03-10 18:30 ` [PATCH 8/9] avocado/ppc_prep_40p.py: check TCG accel in all tests Daniel Henrique Barboza
@ 2022-03-10 18:30 ` Daniel Henrique Barboza
  2022-03-10 23:28 ` [PATCH 0/9] --disable-tcg avocado fixes for ppc-softmmu Murilo Opsfelder Araújo
  2022-03-14 15:21 ` Cédric Le Goater
  10 siblings, 0 replies; 13+ messages in thread
From: Daniel Henrique Barboza @ 2022-03-10 18:30 UTC (permalink / raw)
  To: qemu-devel
  Cc: farosas, Daniel Henrique Barboza, qemu-ppc, clg, muriloo, david

This test times out when running in an IBM POWER host and --disable-tcg.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
 tests/avocado/ppc_virtex_ml507.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/avocado/ppc_virtex_ml507.py b/tests/avocado/ppc_virtex_ml507.py
index a6912ee579..6b07686b56 100644
--- a/tests/avocado/ppc_virtex_ml507.py
+++ b/tests/avocado/ppc_virtex_ml507.py
@@ -19,7 +19,9 @@ def test_ppc_virtex_ml507(self):
         """
         :avocado: tags=arch:ppc
         :avocado: tags=machine:virtex-ml507
+        :avocado: tags=accel:tcg
         """
+        self.require_accelerator("tcg")
         tar_url = ('https://www.qemu-advent-calendar.org'
                    '/2020/download/hippo.tar.gz')
         tar_hash = '306b95bfe7d147f125aa176a877e266db8ef914a'
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH 8/9] avocado/ppc_prep_40p.py: check TCG accel in all tests
  2022-03-10 18:30 ` [PATCH 8/9] avocado/ppc_prep_40p.py: check TCG accel in all tests Daniel Henrique Barboza
@ 2022-03-10 22:37   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 13+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-03-10 22:37 UTC (permalink / raw)
  To: Daniel Henrique Barboza, qemu-devel
  Cc: muriloo, qemu-ppc, clg, david, farosas

On 10/3/22 19:30, Daniel Henrique Barboza wrote:
> All tests in the file times out when running in an IBM POWER host and
> --disable-tcg with an error like the following:
> 
>          Command: ./qemu-system-ppc -display none -vga none (...)
> -machine 40p (...)
>          Output: qemu-system-ppc: Register sync failed... If you're using
> kvm-hv.ko, only "-cpu host" is possible
> qemu-system-ppc: kvm_init_vcpu: kvm_arch_init_vcpu failed (0): Invalid argument
> 
> Since we don't have a way to detect whether the host is running kvm_hv
> or kvm_pr, skip all tests if TCG is not available.
> 
> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
> ---
>   tests/avocado/ppc_prep_40p.py | 6 ++++++
>   1 file changed, 6 insertions(+)

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/9] --disable-tcg avocado fixes for ppc-softmmu
  2022-03-10 18:30 [PATCH 0/9] --disable-tcg avocado fixes for ppc-softmmu Daniel Henrique Barboza
                   ` (8 preceding siblings ...)
  2022-03-10 18:30 ` [PATCH 9/9] avocado/ppc_virtex_ml507.py: check TCG accel in test_ppc_virtex_ml507() Daniel Henrique Barboza
@ 2022-03-10 23:28 ` Murilo Opsfelder Araújo
  2022-03-14 15:21 ` Cédric Le Goater
  10 siblings, 0 replies; 13+ messages in thread
From: Murilo Opsfelder Araújo @ 2022-03-10 23:28 UTC (permalink / raw)
  To: Daniel Henrique Barboza, qemu-devel
  Cc: muriloo, qemu-ppc, clg, david, farosas

On 3/10/22 15:30, Daniel Henrique Barboza wrote:
> Hi,
> 
> These are more test fixes that I missed from my first series [1]. Thanks
> Murilo Opsfelder and Fabiano for letting me know that we still had broken
> tests to deal with.
> 
> All these tests were either a case of 'this needs kvm_pr' or 'this needs
> kvm_hv'. Since avocado doesn't have yet a way of detecting if the host
> is running kvm_hv or kvm_pr, the workaround for now is to skip them if
> TCG isn't available.
> 
> [1] https://lists.gnu.org/archive/html/qemu-devel/2022-03/msg00866.html
> 
> 
> Daniel Henrique Barboza (9):
>    avocado/boot_linux_console.py: check TCG accel in test_ppc_g3beige()
>    avocado/boot_linux_console.py: check TCG accel in test_ppc_mac99()
>    avocado/ppc_405.py: remove test_ppc_taihu()
>    avocado/ppc_405.py: check TCG accel in test_ppc_ref405ep()
>    avocado/ppc_74xx.py: check TCG accel for all tests
>    avocado/ppc_bamboo.py: check TCG accel in test_ppc_bamboo()
>    avocado/ppc_mpc8544ds.py: check TCG accel in test_ppc_mpc8544ds()
>    avocado/ppc_prep_40p.py: check TCG accel in all tests
>    avocado/ppc_virtex_ml507.py: check TCG accel in
>      test_ppc_virtex_ml507()
> 
>   tests/avocado/boot_linux_console.py | 12 ++++++++++++
>   tests/avocado/ppc_405.py            | 10 ++--------
>   tests/avocado/ppc_74xx.py           | 13 +++++++++++++
>   tests/avocado/ppc_bamboo.py         |  2 ++
>   tests/avocado/ppc_mpc8544ds.py      |  2 ++
>   tests/avocado/ppc_prep_40p.py       |  6 ++++++
>   tests/avocado/ppc_virtex_ml507.py   |  2 ++
>   7 files changed, 39 insertions(+), 8 deletions(-)
> 

Hi, Daniel.

With this series and series "--disable-tcg qtest/avocado fixes for ppc64" [0]
applied, check-avocado passed for QEMU built with --disable-tcg --disable-linux-user.

[0] https://lists.nongnu.org/archive/html/qemu-devel/2022-03/msg00866.html

So:

Tested-by: Murilo Opsfelder Araujo <muriloo@linux.ibm.com>

-- 
Murilo


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/9] --disable-tcg avocado fixes for ppc-softmmu
  2022-03-10 18:30 [PATCH 0/9] --disable-tcg avocado fixes for ppc-softmmu Daniel Henrique Barboza
                   ` (9 preceding siblings ...)
  2022-03-10 23:28 ` [PATCH 0/9] --disable-tcg avocado fixes for ppc-softmmu Murilo Opsfelder Araújo
@ 2022-03-14 15:21 ` Cédric Le Goater
  10 siblings, 0 replies; 13+ messages in thread
From: Cédric Le Goater @ 2022-03-14 15:21 UTC (permalink / raw)
  To: Daniel Henrique Barboza, qemu-devel; +Cc: farosas, qemu-ppc, muriloo, david

On 3/10/22 19:30, Daniel Henrique Barboza wrote:
> Hi,
> 
> These are more test fixes that I missed from my first series [1]. Thanks
> Murilo Opsfelder and Fabiano for letting me know that we still had broken
> tests to deal with.
> 
> All these tests were either a case of 'this needs kvm_pr' or 'this needs
> kvm_hv'. Since avocado doesn't have yet a way of detecting if the host
> is running kvm_hv or kvm_pr, the workaround for now is to skip them if
> TCG isn't available.
> 
> [1] https://lists.gnu.org/archive/html/qemu-devel/2022-03/msg00866.html
> 
> 
> Daniel Henrique Barboza (9):
>    avocado/boot_linux_console.py: check TCG accel in test_ppc_g3beige()
>    avocado/boot_linux_console.py: check TCG accel in test_ppc_mac99()
>    avocado/ppc_405.py: remove test_ppc_taihu()
>    avocado/ppc_405.py: check TCG accel in test_ppc_ref405ep()
>    avocado/ppc_74xx.py: check TCG accel for all tests
>    avocado/ppc_bamboo.py: check TCG accel in test_ppc_bamboo()
>    avocado/ppc_mpc8544ds.py: check TCG accel in test_ppc_mpc8544ds()
>    avocado/ppc_prep_40p.py: check TCG accel in all tests
>    avocado/ppc_virtex_ml507.py: check TCG accel in
>      test_ppc_virtex_ml507()
> 
>   tests/avocado/boot_linux_console.py | 12 ++++++++++++
>   tests/avocado/ppc_405.py            | 10 ++--------
>   tests/avocado/ppc_74xx.py           | 13 +++++++++++++
>   tests/avocado/ppc_bamboo.py         |  2 ++
>   tests/avocado/ppc_mpc8544ds.py      |  2 ++
>   tests/avocado/ppc_prep_40p.py       |  6 ++++++
>   tests/avocado/ppc_virtex_ml507.py   |  2 ++
>   7 files changed, 39 insertions(+), 8 deletions(-)
> 


Queued for 7.0

Thanks,

C.


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-03-14 15:22 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-10 18:30 [PATCH 0/9] --disable-tcg avocado fixes for ppc-softmmu Daniel Henrique Barboza
2022-03-10 18:30 ` [PATCH 1/9] avocado/boot_linux_console.py: check TCG accel in test_ppc_g3beige() Daniel Henrique Barboza
2022-03-10 18:30 ` [PATCH 2/9] avocado/boot_linux_console.py: check TCG accel in test_ppc_mac99() Daniel Henrique Barboza
2022-03-10 18:30 ` [PATCH 3/9] avocado/ppc_405.py: remove test_ppc_taihu() Daniel Henrique Barboza
2022-03-10 18:30 ` [PATCH 4/9] avocado/ppc_405.py: check TCG accel in test_ppc_ref405ep() Daniel Henrique Barboza
2022-03-10 18:30 ` [PATCH 5/9] avocado/ppc_74xx.py: check TCG accel for all tests Daniel Henrique Barboza
2022-03-10 18:30 ` [PATCH 6/9] avocado/ppc_bamboo.py: check TCG accel in test_ppc_bamboo() Daniel Henrique Barboza
2022-03-10 18:30 ` [PATCH 7/9] avocado/ppc_mpc8544ds.py: check TCG accel in test_ppc_mpc8544ds() Daniel Henrique Barboza
2022-03-10 18:30 ` [PATCH 8/9] avocado/ppc_prep_40p.py: check TCG accel in all tests Daniel Henrique Barboza
2022-03-10 22:37   ` Philippe Mathieu-Daudé
2022-03-10 18:30 ` [PATCH 9/9] avocado/ppc_virtex_ml507.py: check TCG accel in test_ppc_virtex_ml507() Daniel Henrique Barboza
2022-03-10 23:28 ` [PATCH 0/9] --disable-tcg avocado fixes for ppc-softmmu Murilo Opsfelder Araújo
2022-03-14 15:21 ` Cédric Le Goater

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.