Message ID | 20210112164045.98565-2-thuth@redhat.com |
---|---|
State | New |
Headers | show |
Series | Acceptance tests for mpc8544ds & virtex-ml507 ppc machines | expand |
Hi, On 1/12/21 1:40 PM, Thomas Huth wrote: > Let's gather the POWER-related tests in a separate file. Did you consider having others ppc/ppc64 boot tests together too? Some candidates: tests/acceptance/boot_linux.py:BootLinuxPPC64.test_pseries_tcg tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_ppc64_e500 tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_ppc_g3beige tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_ppc_mac99 tests/acceptance/ppc_prep_40p.py:IbmPrep40pMachine.test_factory_firmware_and_netbsd tests/acceptance/ppc_prep_40p.py:IbmPrep40pMachine.test_openbios_192m tests/acceptance/ppc_prep_40p.py:IbmPrep40pMachine.test_openbios_and_netbsd > > Signed-off-by: Thomas Huth <thuth@redhat.com> > --- > MAINTAINERS | 1 + > tests/acceptance/boot_linux_console.py | 19 -------------- > tests/acceptance/machine_ppc.py | 34 ++++++++++++++++++++++++++ > 3 files changed, 35 insertions(+), 19 deletions(-) > create mode 100644 tests/acceptance/machine_ppc.py Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com> > > diff --git a/MAINTAINERS b/MAINTAINERS > index 4be087b88e..189776a036 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -280,6 +280,7 @@ F: target/ppc/ > F: hw/ppc/ > F: include/hw/ppc/ > F: disas/ppc.c > +F: tests/acceptance/machine_ppc.py > > RISC-V TCG CPUs > M: Palmer Dabbelt <palmer@dabbelt.com> > diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py > index fb41bb7144..41d2c86e98 100644 > --- a/tests/acceptance/boot_linux_console.py > +++ b/tests/acceptance/boot_linux_console.py > @@ -976,25 +976,6 @@ class BootLinuxConsole(LinuxKernelTest): > console_pattern = 'Kernel command line: %s' % kernel_command_line > self.wait_for_console_pattern(console_pattern) > > - def test_ppc64_pseries(self): > - """ > - :avocado: tags=arch:ppc64 > - :avocado: tags=machine:pseries > - """ > - kernel_url = ('https://archives.fedoraproject.org/pub/archive' > - '/fedora-secondary/releases/29/Everything/ppc64le/os' > - '/ppc/ppc64/vmlinuz') > - kernel_hash = '3fe04abfc852b66653b8c3c897a59a689270bc77' > - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) > - > - self.vm.set_console() > - kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=hvc0' > - self.vm.add_args('-kernel', kernel_path, > - '-append', kernel_command_line) > - self.vm.launch() > - console_pattern = 'Kernel command line: %s' % kernel_command_line > - self.wait_for_console_pattern(console_pattern) > - > def test_m68k_q800(self): > """ > :avocado: tags=arch:m68k > diff --git a/tests/acceptance/machine_ppc.py b/tests/acceptance/machine_ppc.py > new file mode 100644 > index 0000000000..51bbfd411c > --- /dev/null > +++ b/tests/acceptance/machine_ppc.py > @@ -0,0 +1,34 @@ > +# Test that Linux kernel boots on ppc machines and check the console > +# > +# Copyright (c) 2018, 2020 Red Hat, Inc. > +# > +# 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 Test > +from avocado_qemu import wait_for_console_pattern > + > +class PpcMachine(Test): > + > + timeout = 90 > + KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 ' > + panic_message = 'Kernel panic - not syncing' > + > + def test_ppc64_pseries(self): > + """ > + :avocado: tags=arch:ppc64 > + :avocado: tags=machine:pseries > + """ > + kernel_url = ('https://archives.fedoraproject.org/pub/archive' > + '/fedora-secondary/releases/29/Everything/ppc64le/os' > + '/ppc/ppc64/vmlinuz') > + kernel_hash = '3fe04abfc852b66653b8c3c897a59a689270bc77' > + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) > + > + self.vm.set_console() > + kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=hvc0' > + self.vm.add_args('-kernel', kernel_path, > + '-append', kernel_command_line) > + self.vm.launch() > + console_pattern = 'Kernel command line: %s' % kernel_command_line > + wait_for_console_pattern(self, console_pattern, self.panic_message)
On 1/12/21 5:40 PM, Thomas Huth wrote: > Let's gather the POWER-related tests in a separate file. > > Signed-off-by: Thomas Huth <thuth@redhat.com> > --- > MAINTAINERS | 1 + > tests/acceptance/boot_linux_console.py | 19 -------------- > tests/acceptance/machine_ppc.py | 34 ++++++++++++++++++++++++++ > 3 files changed, 35 insertions(+), 19 deletions(-) > create mode 100644 tests/acceptance/machine_ppc.py Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
On Tue, Jan 12, 2021 at 05:40:43PM +0100, Thomas Huth wrote: > Let's gather the POWER-related tests in a separate file. > > Signed-off-by: Thomas Huth <thuth@redhat.com> Acked-by: David Gibson <david@gibson.dropbear.id.au> > --- > MAINTAINERS | 1 + > tests/acceptance/boot_linux_console.py | 19 -------------- > tests/acceptance/machine_ppc.py | 34 ++++++++++++++++++++++++++ > 3 files changed, 35 insertions(+), 19 deletions(-) > create mode 100644 tests/acceptance/machine_ppc.py > > diff --git a/MAINTAINERS b/MAINTAINERS > index 4be087b88e..189776a036 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -280,6 +280,7 @@ F: target/ppc/ > F: hw/ppc/ > F: include/hw/ppc/ > F: disas/ppc.c > +F: tests/acceptance/machine_ppc.py > > RISC-V TCG CPUs > M: Palmer Dabbelt <palmer@dabbelt.com> > diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py > index fb41bb7144..41d2c86e98 100644 > --- a/tests/acceptance/boot_linux_console.py > +++ b/tests/acceptance/boot_linux_console.py > @@ -976,25 +976,6 @@ class BootLinuxConsole(LinuxKernelTest): > console_pattern = 'Kernel command line: %s' % kernel_command_line > self.wait_for_console_pattern(console_pattern) > > - def test_ppc64_pseries(self): > - """ > - :avocado: tags=arch:ppc64 > - :avocado: tags=machine:pseries > - """ > - kernel_url = ('https://archives.fedoraproject.org/pub/archive' > - '/fedora-secondary/releases/29/Everything/ppc64le/os' > - '/ppc/ppc64/vmlinuz') > - kernel_hash = '3fe04abfc852b66653b8c3c897a59a689270bc77' > - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) > - > - self.vm.set_console() > - kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=hvc0' > - self.vm.add_args('-kernel', kernel_path, > - '-append', kernel_command_line) > - self.vm.launch() > - console_pattern = 'Kernel command line: %s' % kernel_command_line > - self.wait_for_console_pattern(console_pattern) > - > def test_m68k_q800(self): > """ > :avocado: tags=arch:m68k > diff --git a/tests/acceptance/machine_ppc.py b/tests/acceptance/machine_ppc.py > new file mode 100644 > index 0000000000..51bbfd411c > --- /dev/null > +++ b/tests/acceptance/machine_ppc.py > @@ -0,0 +1,34 @@ > +# Test that Linux kernel boots on ppc machines and check the console > +# > +# Copyright (c) 2018, 2020 Red Hat, Inc. > +# > +# 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 Test > +from avocado_qemu import wait_for_console_pattern > + > +class PpcMachine(Test): > + > + timeout = 90 > + KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 ' > + panic_message = 'Kernel panic - not syncing' > + > + def test_ppc64_pseries(self): > + """ > + :avocado: tags=arch:ppc64 > + :avocado: tags=machine:pseries > + """ > + kernel_url = ('https://archives.fedoraproject.org/pub/archive' > + '/fedora-secondary/releases/29/Everything/ppc64le/os' > + '/ppc/ppc64/vmlinuz') > + kernel_hash = '3fe04abfc852b66653b8c3c897a59a689270bc77' > + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) > + > + self.vm.set_console() > + kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=hvc0' > + self.vm.add_args('-kernel', kernel_path, > + '-append', kernel_command_line) > + self.vm.launch() > + console_pattern = 'Kernel command line: %s' % kernel_command_line > + wait_for_console_pattern(self, console_pattern, self.panic_message)
On 12/01/2021 19.50, Wainer dos Santos Moschetta wrote: > Hi, > > On 1/12/21 1:40 PM, Thomas Huth wrote: >> Let's gather the POWER-related tests in a separate file. > > > Did you consider having others ppc/ppc64 boot tests together too? > > Some candidates: > > tests/acceptance/boot_linux.py:BootLinuxPPC64.test_pseries_tcg > tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_ppc64_e500 > tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_ppc_g3beige > tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_ppc_mac99 The e500, g3beige and mac99 tests are depending on the do_test_advcal_2018() function in that file, so I think they should rather stay there. > tests/acceptance/ppc_prep_40p.py:IbmPrep40pMachine.test_factory_firmware_and_netbsd > tests/acceptance/ppc_prep_40p.py:IbmPrep40pMachine.test_openbios_192m > tests/acceptance/ppc_prep_40p.py:IbmPrep40pMachine.test_openbios_and_netbsd That's a good point, I did not notice that file when writing my patches. Philippe, since you've created this ppc_prep_40p.py file, what do you think, should it be merged with the other ppc tests, or shall we rather keep this separate? Thomas
On Tue, Jan 12, 2021 at 1:42 PM Thomas Huth <thuth@redhat.com> wrote: > > Let's gather the POWER-related tests in a separate file. > > Signed-off-by: Thomas Huth <thuth@redhat.com> > --- > MAINTAINERS | 1 + > tests/acceptance/boot_linux_console.py | 19 -------------- > tests/acceptance/machine_ppc.py | 34 ++++++++++++++++++++++++++ > 3 files changed, 35 insertions(+), 19 deletions(-) > create mode 100644 tests/acceptance/machine_ppc.py > We can have other tests moved to this file later. For now, Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Hi Thomas, On 1/13/21 6:30 AM, Thomas Huth wrote: > On 12/01/2021 19.50, Wainer dos Santos Moschetta wrote: >> Hi, >> >> On 1/12/21 1:40 PM, Thomas Huth wrote: >>> Let's gather the POWER-related tests in a separate file. >> >> >> Did you consider having others ppc/ppc64 boot tests together too? >> >> Some candidates: >> >> tests/acceptance/boot_linux.py:BootLinuxPPC64.test_pseries_tcg >> tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_ppc64_e500 >> tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_ppc_g3beige >> tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_ppc_mac99 > > The e500, g3beige and mac99 tests are depending on the > do_test_advcal_2018() function in that file, so I think they should > rather stay there. > >> tests/acceptance/ppc_prep_40p.py:IbmPrep40pMachine.test_factory_firmware_and_netbsd >> tests/acceptance/ppc_prep_40p.py:IbmPrep40pMachine.test_openbios_192m >> tests/acceptance/ppc_prep_40p.py:IbmPrep40pMachine.test_openbios_and_netbsd >> > > That's a good point, I did not notice that file when writing my patches. > Philippe, since you've created this ppc_prep_40p.py file, what do you > think, should it be merged with the other ppc tests, or shall we rather > keep this separate? The choice was deliberate: the PReP machine has a different set of maintainers. If possible when we have a particular section in MAINTAINERS I'd like to use it as separation, to let the maintainers track changes in tests. In this example, Hervé is interested to look for PReP related files, but doesn't have bandwidth to look at all PPC patches. If this doesn't scale, I suggested (was it on the list or directly to Willian?) to add a Python script to map Avocado test tags to MAINTAINERS entry, so 1/ maintainers could run all tests linked to their subsystem by naming the subsystem, and 2/ when a test fails we know which maintainer to contact. Regards, Phil.
On 04/02/2021 09.52, Philippe Mathieu-Daudé wrote: > Hi Thomas, > > On 1/13/21 6:30 AM, Thomas Huth wrote: >> On 12/01/2021 19.50, Wainer dos Santos Moschetta wrote: >>> Hi, >>> >>> On 1/12/21 1:40 PM, Thomas Huth wrote: >>>> Let's gather the POWER-related tests in a separate file. >>> >>> >>> Did you consider having others ppc/ppc64 boot tests together too? >>> >>> Some candidates: >>> >>> tests/acceptance/boot_linux.py:BootLinuxPPC64.test_pseries_tcg >>> tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_ppc64_e500 >>> tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_ppc_g3beige >>> tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_ppc_mac99 >> >> The e500, g3beige and mac99 tests are depending on the >> do_test_advcal_2018() function in that file, so I think they should >> rather stay there. >> >>> tests/acceptance/ppc_prep_40p.py:IbmPrep40pMachine.test_factory_firmware_and_netbsd >>> tests/acceptance/ppc_prep_40p.py:IbmPrep40pMachine.test_openbios_192m >>> tests/acceptance/ppc_prep_40p.py:IbmPrep40pMachine.test_openbios_and_netbsd >>> >> >> That's a good point, I did not notice that file when writing my patches. >> Philippe, since you've created this ppc_prep_40p.py file, what do you >> think, should it be merged with the other ppc tests, or shall we rather >> keep this separate? > > The choice was deliberate: the PReP machine has a different set of > maintainers. If possible when we have a particular section in > MAINTAINERS I'd like to use it as separation, to let the maintainers > track changes in tests. Ok, fair point, let's keep it separate then! Thomas
On 2/4/21 5:52 AM, Philippe Mathieu-Daudé wrote: > Hi Thomas, > > On 1/13/21 6:30 AM, Thomas Huth wrote: >> On 12/01/2021 19.50, Wainer dos Santos Moschetta wrote: >>> Hi, >>> >>> On 1/12/21 1:40 PM, Thomas Huth wrote: >>>> Let's gather the POWER-related tests in a separate file. >>> >>> >>> Did you consider having others ppc/ppc64 boot tests together too? >>> >>> Some candidates: >>> >>> tests/acceptance/boot_linux.py:BootLinuxPPC64.test_pseries_tcg >>> tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_ppc64_e500 >>> tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_ppc_g3beige >>> tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_ppc_mac99 >> >> The e500, g3beige and mac99 tests are depending on the >> do_test_advcal_2018() function in that file, so I think they should >> rather stay there. >> >>> tests/acceptance/ppc_prep_40p.py:IbmPrep40pMachine.test_factory_firmware_and_netbsd >>> tests/acceptance/ppc_prep_40p.py:IbmPrep40pMachine.test_openbios_192m >>> tests/acceptance/ppc_prep_40p.py:IbmPrep40pMachine.test_openbios_and_netbsd >>> >> >> That's a good point, I did not notice that file when writing my patches. >> Philippe, since you've created this ppc_prep_40p.py file, what do you >> think, should it be merged with the other ppc tests, or shall we rather >> keep this separate? > > The choice was deliberate: the PReP machine has a different set of > maintainers. If possible when we have a particular section in > MAINTAINERS I'd like to use it as separation, to let the maintainers > track changes in tests. > > In this example, Hervé is interested to look for PReP related files, > but doesn't have bandwidth to look at all PPC patches. > > If this doesn't scale, I suggested (was it on the list or directly > to Willian?) I remember we had this conversation some time ago, so, I'm sure you suggested to me, not sure if you mentioned that to the list. > to add a Python script to map Avocado test tags to > MAINTAINERS entry, so 1/ maintainers could run all tests linked to > their subsystem by naming the subsystem, and 2/ when a test fails > we know which maintainer to contact. And I agree that is an interesting idea. > > Regards, > > Phil. >
diff --git a/MAINTAINERS b/MAINTAINERS index 4be087b88e..189776a036 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -280,6 +280,7 @@ F: target/ppc/ F: hw/ppc/ F: include/hw/ppc/ F: disas/ppc.c +F: tests/acceptance/machine_ppc.py RISC-V TCG CPUs M: Palmer Dabbelt <palmer@dabbelt.com> diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py index fb41bb7144..41d2c86e98 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -976,25 +976,6 @@ class BootLinuxConsole(LinuxKernelTest): console_pattern = 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) - def test_ppc64_pseries(self): - """ - :avocado: tags=arch:ppc64 - :avocado: tags=machine:pseries - """ - kernel_url = ('https://archives.fedoraproject.org/pub/archive' - '/fedora-secondary/releases/29/Everything/ppc64le/os' - '/ppc/ppc64/vmlinuz') - kernel_hash = '3fe04abfc852b66653b8c3c897a59a689270bc77' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) - - self.vm.set_console() - kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=hvc0' - self.vm.add_args('-kernel', kernel_path, - '-append', kernel_command_line) - self.vm.launch() - console_pattern = 'Kernel command line: %s' % kernel_command_line - self.wait_for_console_pattern(console_pattern) - def test_m68k_q800(self): """ :avocado: tags=arch:m68k diff --git a/tests/acceptance/machine_ppc.py b/tests/acceptance/machine_ppc.py new file mode 100644 index 0000000000..51bbfd411c --- /dev/null +++ b/tests/acceptance/machine_ppc.py @@ -0,0 +1,34 @@ +# Test that Linux kernel boots on ppc machines and check the console +# +# Copyright (c) 2018, 2020 Red Hat, Inc. +# +# 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 Test +from avocado_qemu import wait_for_console_pattern + +class PpcMachine(Test): + + timeout = 90 + KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 ' + panic_message = 'Kernel panic - not syncing' + + def test_ppc64_pseries(self): + """ + :avocado: tags=arch:ppc64 + :avocado: tags=machine:pseries + """ + kernel_url = ('https://archives.fedoraproject.org/pub/archive' + '/fedora-secondary/releases/29/Everything/ppc64le/os' + '/ppc/ppc64/vmlinuz') + kernel_hash = '3fe04abfc852b66653b8c3c897a59a689270bc77' + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + + self.vm.set_console() + kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=hvc0' + self.vm.add_args('-kernel', kernel_path, + '-append', kernel_command_line) + self.vm.launch() + console_pattern = 'Kernel command line: %s' % kernel_command_line + wait_for_console_pattern(self, console_pattern, self.panic_message)
Let's gather the POWER-related tests in a separate file. Signed-off-by: Thomas Huth <thuth@redhat.com> --- MAINTAINERS | 1 + tests/acceptance/boot_linux_console.py | 19 -------------- tests/acceptance/machine_ppc.py | 34 ++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 19 deletions(-) create mode 100644 tests/acceptance/machine_ppc.py