As with x86_64 we now have the bits to add a KVM gdb test. One minor wrinkle is the s390x only supports WP_WRITE watch points so we skip the other watch point tests lest we get confusing messages about failing to insert HW breakpoints.
Signed-off-by: Alex Bennée <[email protected]> --- tests/functional/gdb-scripts/kernel_gdb_test.py | 10 ++++++---- tests/functional/s390x/test_tuxrun.py | 14 ++++++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/tests/functional/gdb-scripts/kernel_gdb_test.py b/tests/functional/gdb-scripts/kernel_gdb_test.py index 2d62fe01f10..56f0514c943 100644 --- a/tests/functional/gdb-scripts/kernel_gdb_test.py +++ b/tests/functional/gdb-scripts/kernel_gdb_test.py @@ -107,11 +107,13 @@ def do_one_watch(sym, wtype, text): def check_watches(sym_name): "Watch a symbol for any access." - # Should hit for any read - do_one_watch(sym_name, gdb.WP_ACCESS, "awatch") + # s390 only supports write watchpoints + if "s390" not in gdb.selected_frame().architecture().name(): + # Should hit for any read + do_one_watch(sym_name, gdb.WP_ACCESS, "awatch") - # Again should hit for reads - do_one_watch(sym_name, gdb.WP_READ, "rwatch") + # Again should hit for reads + do_one_watch(sym_name, gdb.WP_READ, "rwatch") # Finally when it is written do_one_watch(sym_name, gdb.WP_WRITE, "watch") diff --git a/tests/functional/s390x/test_tuxrun.py b/tests/functional/s390x/test_tuxrun.py index 8e0261e2b7f..528af3c08ff 100755 --- a/tests/functional/s390x/test_tuxrun.py +++ b/tests/functional/s390x/test_tuxrun.py @@ -19,6 +19,9 @@ class TuxRunS390xTest(TuxRunBaselineTest): ASSET_S390X_KERNEL = Asset( 'https://storage.tuxboot.com/kernels/6.18.54/s390/bzImage', '5efeb31754b211440e1595ab11355bb006fe78a2c0604ed0a8c55c4598b71aec') + ASSET_S390X_VMLINUX = Asset( + 'https://storage.tuxboot.com/kernels/6.18.54/s390/vmlinux.xz', + '5bbd4d34e0950f88053a9bfd16078896df4b1ee1696fc2ad62488e681a6bdd8e') ASSET_S390X_ROOTFS = Asset( 'https://storage.tuxboot.com/buildroot/20260924/s390/rootfs.ext4.zst', '5ba18c4d18831c50a0c743990f7bdee1d3b520629d423c55b668d8fbbac9c6f5') @@ -42,5 +45,16 @@ def test_s390_kvm(self): haltmsg="Requesting system halt", accel="kvm") + def test_s390_kvm_gdb(self): + self.set_machine('s390-ccw-virtio') + self.require_accelerator('kvm') + self.wait_for_shutdown=False + self.common_tuxrun_gdb(kernel_asset=self.ASSET_S390X_KERNEL, + vmlinux_asset=self.ASSET_S390X_VMLINUX, + rootfs_asset=self.ASSET_S390X_ROOTFS, + drive="virtio-blk-ccw", + haltmsg="Requesting system halt", + accel="kvm") + if __name__ == '__main__': TuxRunBaselineTest.main() -- 2.47.3
