On 10/12/26 19:03, Alex Bennée wrote:
This resurrects the hand run test script from d84842be6c5 (tests:
remove test-gdbstub.py) and modernises it to use the shared test
infrastructure for run-test.

We then tweak the common tuxrun code to over an alternative "launch
via gdbstub" helper which reuses the existing code but:

   - needs a vmlinux with symbols
   - extend qargs with stuff normally added by vm.launch
   - passes kargs directly
   - runs with the gdb run-test script
   - log the run-test output to the console log

Message-ID: <[email protected]>
Signed-off-by: Alex Bennée <[email protected]>

---
v2
   - add self.vm._machine to qargs
   - drop leading spaces in print () calls
   - add register read tests
   - use gdb.Breakpoint for hwbreak as for swbreak
   - drop flaky symbol evaluation, verify hit_count instead
   - explicit gdb.BP_BREAKPOINT for CatchBreakpoint
---
  .../functional/gdb-scripts/kernel_gdb_test.py | 174 ++++++++++++++++++
  tests/functional/qemu_test/tuxruntest.py      |  96 +++++++++-
  2 files changed, 261 insertions(+), 9 deletions(-)
  create mode 100644 tests/functional/gdb-scripts/kernel_gdb_test.py

[...]

-    def fetch_tuxrun_assets(self, kernel_asset, rootfs_asset, dtb_asset=None):
+    def fetch_tuxrun_assets(self, kernel_asset, rootfs_asset,
+                            dtb_asset=None, vmlinux_asset=None):
          """
          Fetch the TuxBoot assets.
          """
          kernel_image =  kernel_asset.fetch()
          disk_image = self.uncompress(rootfs_asset)
          dtb = dtb_asset.fetch() if dtb_asset is not None else None
+        vmlinux = self.uncompress(vmlinux_asset) if vmlinux_asset is not None 
else None
- return (kernel_image, disk_image, dtb)
+        return (kernel_image, disk_image, dtb, vmlinux)

pylint complains that unpacking in tests/functional/sh4/test_tuxrun.py
will now fail.

[...]


Reply via email to