From e365d26e42281aae3dcb47aa63c862892efadb0c Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Tue, 19 Aug 2025 13:24:00 +0200 Subject: tests/functional: Move xtensa tests into target-specific folder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The tests/functional folder has become quite crowded, thus move the xtensa tests into a target-specific subfolder. Reviewed-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth Message-ID: <20250819112403.432587-24-thuth@redhat.com> --- MAINTAINERS | 2 +- tests/functional/meson.build | 6 +----- tests/functional/test_xtensa_lx60.py | 26 -------------------------- tests/functional/test_xtensa_replay.py | 28 ---------------------------- tests/functional/xtensa/meson.build | 6 ++++++ tests/functional/xtensa/test_lx60.py | 26 ++++++++++++++++++++++++++ tests/functional/xtensa/test_replay.py | 28 ++++++++++++++++++++++++++++ 7 files changed, 62 insertions(+), 60 deletions(-) delete mode 100755 tests/functional/test_xtensa_lx60.py delete mode 100755 tests/functional/test_xtensa_replay.py create mode 100644 tests/functional/xtensa/meson.build create mode 100755 tests/functional/xtensa/test_lx60.py create mode 100755 tests/functional/xtensa/test_replay.py diff --git a/MAINTAINERS b/MAINTAINERS index 7b1a94f..792d2d6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2005,7 +2005,7 @@ S: Maintained F: hw/xtensa/xtfpga.c F: hw/net/opencores_eth.c F: include/hw/xtensa/mx_pic.h -F: tests/functional/test_xtensa_lx60.py +F: tests/functional/xtensa/test_lx60.py Devices ------- diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 34e3023..b1eec16 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -35,6 +35,7 @@ subdir('sh4eb') subdir('sparc') subdir('sparc64') subdir('x86_64') +subdir('xtensa') tests_generic_system = [ 'empty_cpu_model', @@ -48,11 +49,6 @@ tests_generic_linuxuser = [ tests_generic_bsduser = [ ] -tests_xtensa_system_thorough = [ - 'xtensa_lx60', - 'xtensa_replay', -] - precache_all = [] foreach speed : ['quick', 'thorough'] foreach dir : target_dirs diff --git a/tests/functional/test_xtensa_lx60.py b/tests/functional/test_xtensa_lx60.py deleted file mode 100755 index 147c920..0000000 --- a/tests/functional/test_xtensa_lx60.py +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python3 -# -# Functional test that boots a Linux kernel on an xtensa lx650 machine -# and checks the console -# -# SPDX-License-Identifier: GPL-2.0-or-later - -from qemu_test import LinuxKernelTest, Asset - - -class XTensaLX60Test(LinuxKernelTest): - - ASSET_DAY02 = Asset( - 'https://qemu-advcal.gitlab.io/qac-best-of-multiarch/download/day02.tar.xz', - '68ff07f9b3fd3df36d015eb46299ba44748e94bfbb2d5295fddc1a8d4a9fd324') - - def test_xtensa_lx60(self): - self.set_machine('lx60') - self.cpu = 'dc233c' - self.archive_extract(self.ASSET_DAY02) - self.launch_kernel(self.scratch_file('day02', - 'santas-sleigh-ride.elf'), - wait_for='QEMU advent calendar') - -if __name__ == '__main__': - LinuxKernelTest.main() diff --git a/tests/functional/test_xtensa_replay.py b/tests/functional/test_xtensa_replay.py deleted file mode 100755 index eb00a3b..0000000 --- a/tests/functional/test_xtensa_replay.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python3 -# -# Replay test that boots a Linux kernel on an xtensa lx650 machine -# and checks the console -# -# SPDX-License-Identifier: GPL-2.0-or-later - -from qemu_test import Asset -from replay_kernel import ReplayKernelBase - - -class XTensaReplay(ReplayKernelBase): - - ASSET_DAY02 = Asset( - 'https://qemu-advcal.gitlab.io/qac-best-of-multiarch/download/day02.tar.xz', - '68ff07f9b3fd3df36d015eb46299ba44748e94bfbb2d5295fddc1a8d4a9fd324') - - def test_replay(self): - self.set_machine('lx60') - self.cpu = 'dc233c' - kernel_path = self.archive_extract(self.ASSET_DAY02, - member='day02/santas-sleigh-ride.elf') - self.run_rr(kernel_path, self.REPLAY_KERNEL_COMMAND_LINE, - 'QEMU advent calendar') - - -if __name__ == '__main__': - ReplayKernelBase.main() diff --git a/tests/functional/xtensa/meson.build b/tests/functional/xtensa/meson.build new file mode 100644 index 0000000..d61d82a --- /dev/null +++ b/tests/functional/xtensa/meson.build @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +tests_xtensa_system_thorough = [ + 'lx60', + 'replay', +] diff --git a/tests/functional/xtensa/test_lx60.py b/tests/functional/xtensa/test_lx60.py new file mode 100755 index 0000000..147c920 --- /dev/null +++ b/tests/functional/xtensa/test_lx60.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 +# +# Functional test that boots a Linux kernel on an xtensa lx650 machine +# and checks the console +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import LinuxKernelTest, Asset + + +class XTensaLX60Test(LinuxKernelTest): + + ASSET_DAY02 = Asset( + 'https://qemu-advcal.gitlab.io/qac-best-of-multiarch/download/day02.tar.xz', + '68ff07f9b3fd3df36d015eb46299ba44748e94bfbb2d5295fddc1a8d4a9fd324') + + def test_xtensa_lx60(self): + self.set_machine('lx60') + self.cpu = 'dc233c' + self.archive_extract(self.ASSET_DAY02) + self.launch_kernel(self.scratch_file('day02', + 'santas-sleigh-ride.elf'), + wait_for='QEMU advent calendar') + +if __name__ == '__main__': + LinuxKernelTest.main() diff --git a/tests/functional/xtensa/test_replay.py b/tests/functional/xtensa/test_replay.py new file mode 100755 index 0000000..eb00a3b --- /dev/null +++ b/tests/functional/xtensa/test_replay.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python3 +# +# Replay test that boots a Linux kernel on an xtensa lx650 machine +# and checks the console +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import Asset +from replay_kernel import ReplayKernelBase + + +class XTensaReplay(ReplayKernelBase): + + ASSET_DAY02 = Asset( + 'https://qemu-advcal.gitlab.io/qac-best-of-multiarch/download/day02.tar.xz', + '68ff07f9b3fd3df36d015eb46299ba44748e94bfbb2d5295fddc1a8d4a9fd324') + + def test_replay(self): + self.set_machine('lx60') + self.cpu = 'dc233c' + kernel_path = self.archive_extract(self.ASSET_DAY02, + member='day02/santas-sleigh-ride.elf') + self.run_rr(kernel_path, self.REPLAY_KERNEL_COMMAND_LINE, + 'QEMU advent calendar') + + +if __name__ == '__main__': + ReplayKernelBase.main() -- cgit v1.1