F: docs/system/ppc/embedded.rst
F: docs/system/target-ppc.rst
F: tests/tcg/ppc*/*
+F: tests/functional/test_ppc_74xx.py
RISC-V TCG CPUs
M: Palmer Dabbelt <palmer@dabbelt.com>
F: hw/net/
F: include/hw/net/
F: tests/qtest/virtio-net-test.c
+F: tests/functional/test_info_usernet.py
F: docs/virtio-net-failover.rst
T: git https://github.com/jasowang/qemu.git net
F: include/qemu/option.h
F: tests/unit/test-keyval.c
F: tests/unit/test-qemu-opts.c
+F: tests/functional/test_version.py
F: util/keyval.c
F: util/qemu-option.c
+++ /dev/null
-# Test for the hmp command "info usernet"
-#
-# Copyright (c) 2021 Red Hat, Inc.
-#
-# Author:
-# Cleber Rosa <crosa@redhat.com>
-#
-# 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_qemu import QemuSystemTest
-
-from qemu.utils import get_info_usernet_hostfwd_port
-
-
-class InfoUsernet(QemuSystemTest):
- """
- :avocado: tags=machine:none
- """
-
- def test_hostfwd(self):
- self.require_netdev('user')
- self.vm.add_args('-netdev', 'user,id=vnet,hostfwd=:127.0.0.1:0-:22')
- self.vm.launch()
- res = self.vm.cmd('human-monitor-command',
- command_line='info usernet')
- port = get_info_usernet_hostfwd_port(res)
- self.assertIsNotNone(port,
- ('"info usernet" output content does not seem to '
- 'contain the redirected port'))
- self.assertGreater(port, 0,
- ('Found a redirected port that is not greater than'
- ' zero'))
+++ /dev/null
-# 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_qemu import QemuSystemTest
-from avocado_qemu import wait_for_console_pattern
-
-class ppc74xxCpu(QemuSystemTest):
- """
- :avocado: tags=arch:ppc
- :avocado: tags=accel:tcg
- """
- timeout = 5
-
- 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')
- wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
-
- 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')
- wait_for_console_pattern(self, '>> CPU type PowerPC,74xx')
-
- 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')
- wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
-
- 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')
- wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
-
- 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')
- wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
-
- 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')
- wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
-
- 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')
- wait_for_console_pattern(self, '>> CPU type PowerPC,MPC86xx')
-
- 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')
- wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
-
- 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')
- wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
-
- 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')
- wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
-
- 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')
- wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
-
- 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')
- wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
+++ /dev/null
-# Version check example test
-#
-# Copyright (c) 2018 Red Hat, Inc.
-#
-# Author:
-# Cleber Rosa <crosa@redhat.com>
-#
-# 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_qemu import QemuSystemTest
-
-
-class Version(QemuSystemTest):
- """
- :avocado: tags=quick
- :avocado: tags=machine:none
- """
- def test_qmp_human_info_version(self):
- self.vm.add_args('-nodefaults')
- self.vm.launch()
- res = self.vm.cmd('human-monitor-command',
- command_line='info version')
- self.assertRegex(res, r'^(\d+\.\d+\.\d)')
tests_generic_system = [
'empty_cpu_model',
+ 'info_usernet',
+ 'version',
+]
+
+tests_ppc_quick = [
+ 'ppc_74xx',
]
tests_generic_linuxuser = [
--- /dev/null
+#!/usr/bin/env python3
+#
+# Test for the hmp command "info usernet"
+#
+# Copyright (c) 2021 Red Hat, Inc.
+#
+# Author:
+# Cleber Rosa <crosa@redhat.com>
+#
+# 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 qemu_test import QemuSystemTest
+
+from qemu.utils import get_info_usernet_hostfwd_port
+
+
+class InfoUsernet(QemuSystemTest):
+
+ def test_hostfwd(self):
+ self.require_netdev('user')
+ self.set_machine('none')
+ self.vm.add_args('-netdev', 'user,id=vnet,hostfwd=:127.0.0.1:0-:22')
+ self.vm.launch()
+ res = self.vm.cmd('human-monitor-command',
+ command_line='info usernet')
+ port = get_info_usernet_hostfwd_port(res)
+ self.assertIsNotNone(port,
+ ('"info usernet" output content does not seem to '
+ 'contain the redirected port'))
+ self.assertGreater(port, 0,
+ ('Found a redirected port that is not greater than'
+ ' zero'))
+
+if __name__ == '__main__':
+ QemuSystemTest.main()
--- /dev/null
+#!/usr/bin/env python3
+#
+# 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 qemu_test import QemuSystemTest
+from qemu_test import wait_for_console_pattern
+
+class ppc74xxCpu(QemuSystemTest):
+
+ timeout = 5
+
+ def test_ppc_7400(self):
+ self.require_accelerator("tcg")
+ self.set_machine('g3beige')
+ self.vm.set_console()
+ self.vm.add_args('-cpu', '7400')
+ self.vm.launch()
+ wait_for_console_pattern(self, '>> OpenBIOS')
+ wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
+
+ def test_ppc_7410(self):
+ self.require_accelerator("tcg")
+ self.set_machine('g3beige')
+ self.vm.set_console()
+ self.vm.add_args('-cpu', '7410')
+ self.vm.launch()
+ wait_for_console_pattern(self, '>> OpenBIOS')
+ wait_for_console_pattern(self, '>> CPU type PowerPC,74xx')
+
+ def test_ppc_7441(self):
+ self.require_accelerator("tcg")
+ self.set_machine('g3beige')
+ self.vm.set_console()
+ self.vm.add_args('-cpu', '7441')
+ self.vm.launch()
+ wait_for_console_pattern(self, '>> OpenBIOS')
+ wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
+
+ def test_ppc_7445(self):
+ self.require_accelerator("tcg")
+ self.set_machine('g3beige')
+ self.vm.set_console()
+ self.vm.add_args('-cpu', '7445')
+ self.vm.launch()
+ wait_for_console_pattern(self, '>> OpenBIOS')
+ wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
+
+ def test_ppc_7447(self):
+ self.require_accelerator("tcg")
+ self.set_machine('g3beige')
+ self.vm.set_console()
+ self.vm.add_args('-cpu', '7447')
+ self.vm.launch()
+ wait_for_console_pattern(self, '>> OpenBIOS')
+ wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
+
+ def test_ppc_7447a(self):
+ self.require_accelerator("tcg")
+ self.set_machine('g3beige')
+ self.vm.set_console()
+ self.vm.add_args('-cpu', '7447a')
+ self.vm.launch()
+ wait_for_console_pattern(self, '>> OpenBIOS')
+ wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
+
+ def test_ppc_7448(self):
+ self.require_accelerator("tcg")
+ self.set_machine('g3beige')
+ self.vm.set_console()
+ self.vm.add_args('-cpu', '7448')
+ self.vm.launch()
+ wait_for_console_pattern(self, '>> OpenBIOS')
+ wait_for_console_pattern(self, '>> CPU type PowerPC,MPC86xx')
+
+ def test_ppc_7450(self):
+ self.require_accelerator("tcg")
+ self.set_machine('g3beige')
+ self.vm.set_console()
+ self.vm.add_args('-cpu', '7450')
+ self.vm.launch()
+ wait_for_console_pattern(self, '>> OpenBIOS')
+ wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
+
+ def test_ppc_7451(self):
+ self.require_accelerator("tcg")
+ self.set_machine('g3beige')
+ self.vm.set_console()
+ self.vm.add_args('-cpu', '7451')
+ self.vm.launch()
+ wait_for_console_pattern(self, '>> OpenBIOS')
+ wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
+
+ def test_ppc_7455(self):
+ self.require_accelerator("tcg")
+ self.set_machine('g3beige')
+ self.vm.set_console()
+ self.vm.add_args('-cpu', '7455')
+ self.vm.launch()
+ wait_for_console_pattern(self, '>> OpenBIOS')
+ wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
+
+ def test_ppc_7457(self):
+ self.require_accelerator("tcg")
+ self.set_machine('g3beige')
+ self.vm.set_console()
+ self.vm.add_args('-cpu', '7457')
+ self.vm.launch()
+ wait_for_console_pattern(self, '>> OpenBIOS')
+ wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
+
+ def test_ppc_7457a(self):
+ self.require_accelerator("tcg")
+ self.set_machine('g3beige')
+ self.vm.set_console()
+ self.vm.add_args('-cpu', '7457a')
+ self.vm.launch()
+ wait_for_console_pattern(self, '>> OpenBIOS')
+ wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
+
+if __name__ == '__main__':
+ QemuSystemTest.main()
--- /dev/null
+#!/usr/bin/env python3
+#
+# Version check example test
+#
+# Copyright (c) 2018 Red Hat, Inc.
+#
+# Author:
+# Cleber Rosa <crosa@redhat.com>
+#
+# 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 qemu_test import QemuSystemTest
+
+
+class Version(QemuSystemTest):
+
+ def test_qmp_human_info_version(self):
+ self.set_machine('none')
+ self.vm.add_args('-nodefaults')
+ self.vm.launch()
+ res = self.vm.cmd('human-monitor-command',
+ command_line='info version')
+ self.assertRegex(res, r'^(\d+\.\d+\.\d)')
+
+if __name__ == '__main__':
+ QemuSystemTest.main()