[PATCH] tests/avocado: ppc: Add smoke tests for MPC7400 and MPC7450 families

Fabiano Rosas posted 1 patch 2 years, 5 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20211119135348.407679-1-farosas@linux.ibm.com
Maintainers: Wainer dos Santos Moschetta <wainersm@redhat.com>, Willian Rampazzo <willianr@redhat.com>, Cleber Rosa <crosa@redhat.com>, "Philippe Mathieu-Daudé" <philmd@redhat.com>
There is a newer version of this series
tests/avocado/ppc_74xx.py | 134 ++++++++++++++++++++++++++++++++++++++
1 file changed, 134 insertions(+)
create mode 100644 tests/avocado/ppc_74xx.py
[PATCH] tests/avocado: ppc: Add smoke tests for MPC7400 and MPC7450 families
Posted by Fabiano Rosas 2 years, 5 months ago
These tests ensure that our emulation for these cpus is not completely
broken and we can at least run OpenBIOS on them.

$ make check-avocado AVOCADO_TESTS=../tests/avocado/ppc_74xx.py

Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com>

---
Note that the 7450s are currently broken, depending on the fix for
https://gitlab.com/qemu-project/qemu/-/issues/86 that is being
discussed in the thread:

https://lists.nongnu.org/archive/html/qemu-ppc/2021-11/msg00289.html
---
 tests/avocado/ppc_74xx.py | 134 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 134 insertions(+)
 create mode 100644 tests/avocado/ppc_74xx.py

diff --git a/tests/avocado/ppc_74xx.py b/tests/avocado/ppc_74xx.py
new file mode 100644
index 0000000000..72b99d39c0
--- /dev/null
+++ b/tests/avocado/ppc_74xx.py
@@ -0,0 +1,134 @@
+# Smoke tests for 74xx cpus (aka G4).
+#
+# Copyright (c) 2021, IBM Corp.
+#
+# This work is licensed under the terms of the GNU GPL, version 2 or
+# later.  See the COPYING file in the top-level directory.
+
+from avocado import skip
+from avocado_qemu import QemuSystemTest
+from avocado_qemu import wait_for_console_pattern
+
+class ppc74xxCpu(QemuSystemTest):
+
+    timeout = 5
+
+    def test_ppc_7400(self):
+        """
+        :avocado: tags=arch:ppc
+        :avocado: tags=cpu:7400
+        """
+        self.vm.set_console()
+        self.vm.launch()
+        wait_for_console_pattern(self, '>> OpenBIOS')
+        wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
+
+    def test_ppc_7410(self):
+        """
+        :avocado: tags=arch:ppc
+        :avocado: tags=cpu:7410
+        """
+        self.vm.set_console()
+        self.vm.launch()
+        wait_for_console_pattern(self, '>> OpenBIOS')
+        wait_for_console_pattern(self, '>> CPU type PowerPC,74xx')
+
+    def test_ppc_7441(self):
+        """
+        :avocado: tags=arch:ppc
+        :avocado: tags=cpu:7441
+        """
+        self.vm.set_console()
+        self.vm.launch()
+        wait_for_console_pattern(self, '>> OpenBIOS')
+        wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
+
+    def test_ppc_7445(self):
+        """
+        :avocado: tags=arch:ppc
+        :avocado: tags=cpu:7445
+        """
+        self.vm.set_console()
+        self.vm.launch()
+        wait_for_console_pattern(self, '>> OpenBIOS')
+        wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
+
+    def test_ppc_7447(self):
+        """
+        :avocado: tags=arch:ppc
+        :avocado: tags=cpu:7447
+        """
+        self.vm.set_console()
+        self.vm.launch()
+        wait_for_console_pattern(self, '>> OpenBIOS')
+        wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
+
+    def test_ppc_7447a(self):
+        """
+        :avocado: tags=arch:ppc
+        :avocado: tags=cpu:7447a
+        """
+        self.vm.set_console()
+        self.vm.launch()
+        wait_for_console_pattern(self, '>> OpenBIOS')
+        wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
+
+    def test_ppc_7448(self):
+        """
+        :avocado: tags=arch:ppc
+        :avocado: tags=cpu:7448
+        """
+        self.vm.set_console()
+        self.vm.launch()
+        wait_for_console_pattern(self, '>> OpenBIOS')
+        wait_for_console_pattern(self, '>> CPU type PowerPC,MPC86xx')
+
+    def test_ppc_7450(self):
+        """
+        :avocado: tags=arch:ppc
+        :avocado: tags=cpu:7450
+        """
+        self.vm.set_console()
+        self.vm.launch()
+        wait_for_console_pattern(self, '>> OpenBIOS')
+        wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
+
+    def test_ppc_7451(self):
+        """
+        :avocado: tags=arch:ppc
+        :avocado: tags=cpu:7451
+        """
+        self.vm.set_console()
+        self.vm.launch()
+        wait_for_console_pattern(self, '>> OpenBIOS')
+        wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
+
+    def test_ppc_7455(self):
+        """
+        :avocado: tags=arch:ppc
+        :avocado: tags=cpu:7455
+        """
+        self.vm.set_console()
+        self.vm.launch()
+        wait_for_console_pattern(self, '>> OpenBIOS')
+        wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
+
+    def test_ppc_7457(self):
+        """
+        :avocado: tags=arch:ppc
+        :avocado: tags=cpu:7457
+        """
+        self.vm.set_console()
+        self.vm.launch()
+        wait_for_console_pattern(self, '>> OpenBIOS')
+        wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
+
+    def test_ppc_7457a(self):
+        """
+        :avocado: tags=arch:ppc
+        :avocado: tags=cpu:7457a
+        """
+        self.vm.set_console()
+        self.vm.launch()
+        wait_for_console_pattern(self, '>> OpenBIOS')
+        wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
-- 
2.29.2


Re: [PATCH] tests/avocado: ppc: Add smoke tests for MPC7400 and MPC7450 families
Posted by Willian Rampazzo 2 years, 5 months ago
On Fri, Nov 19, 2021 at 10:54 AM Fabiano Rosas <farosas@linux.ibm.com> wrote:
>
> These tests ensure that our emulation for these cpus is not completely
> broken and we can at least run OpenBIOS on them.
>
> $ make check-avocado AVOCADO_TESTS=../tests/avocado/ppc_74xx.py
>
> Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com>
>
> ---
> Note that the 7450s are currently broken, depending on the fix for
> https://gitlab.com/qemu-project/qemu/-/issues/86 that is being
> discussed in the thread:
>
> https://lists.nongnu.org/archive/html/qemu-ppc/2021-11/msg00289.html
> ---
>  tests/avocado/ppc_74xx.py | 134 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 134 insertions(+)
>  create mode 100644 tests/avocado/ppc_74xx.py
>
> diff --git a/tests/avocado/ppc_74xx.py b/tests/avocado/ppc_74xx.py
> new file mode 100644
> index 0000000000..72b99d39c0
> --- /dev/null
> +++ b/tests/avocado/ppc_74xx.py
> @@ -0,0 +1,134 @@
> +# Smoke tests for 74xx cpus (aka G4).
> +#
> +# Copyright (c) 2021, IBM Corp.
> +#
> +# This work is licensed under the terms of the GNU GPL, version 2 or
> +# later.  See the COPYING file in the top-level directory.
> +
> +from avocado import skip

You are not using this import in the file. No need to import it here.

Removing the unused import, the code looks good to me, so:

Reviewed-by: Willian Rampazzo <willianr@redhat.com>


Re: [PATCH] tests/avocado: ppc: Add smoke tests for MPC7400 and MPC7450 families
Posted by Willian Rampazzo 2 years, 5 months ago
One more comment, sorry.

On Fri, Nov 19, 2021 at 10:54 AM Fabiano Rosas <farosas@linux.ibm.com> wrote:
>
> These tests ensure that our emulation for these cpus is not completely
> broken and we can at least run OpenBIOS on them.
>
> $ make check-avocado AVOCADO_TESTS=../tests/avocado/ppc_74xx.py
>
> Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com>
>
> ---
> Note that the 7450s are currently broken, depending on the fix for
> https://gitlab.com/qemu-project/qemu/-/issues/86 that is being
> discussed in the thread:
>
> https://lists.nongnu.org/archive/html/qemu-ppc/2021-11/msg00289.html
> ---
>  tests/avocado/ppc_74xx.py | 134 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 134 insertions(+)
>  create mode 100644 tests/avocado/ppc_74xx.py
>
> diff --git a/tests/avocado/ppc_74xx.py b/tests/avocado/ppc_74xx.py
> new file mode 100644
> index 0000000000..72b99d39c0
> --- /dev/null
> +++ b/tests/avocado/ppc_74xx.py
> @@ -0,0 +1,134 @@
> +# Smoke tests for 74xx cpus (aka G4).
> +#
> +# Copyright (c) 2021, IBM Corp.
> +#
> +# This work is licensed under the terms of the GNU GPL, version 2 or
> +# later.  See the COPYING file in the top-level directory.
> +
> +from avocado import skip
> +from avocado_qemu import QemuSystemTest
> +from avocado_qemu import wait_for_console_pattern
> +
> +class ppc74xxCpu(QemuSystemTest):
> +
> +    timeout = 5
> +
> +    def test_ppc_7400(self):
> +        """
> +        :avocado: tags=arch:ppc

All your tests are using the same "arch" tag, so you can define it in
the class and avoid duplication. This is more aesthetic, so it is up
to you.