X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=tests%2Ftcg%2Faarch64%2Fgdbstub%2Ftest-sve-ioctl.py;h=a78a3a2514da28b1d09ca36f08e93fb21d7f58cd;hb=4d48c1bc079147a02ec1a3df9a41497c515d2e61;hp=ee8d467e59dcef1acfb283ad5f5e6cbf0b594a04;hpb=87ab270429618c13a6bf6dfc90d5edf6a3fa99b9;p=mirror_qemu.git diff --git a/tests/tcg/aarch64/gdbstub/test-sve-ioctl.py b/tests/tcg/aarch64/gdbstub/test-sve-ioctl.py index ee8d467e59..a78a3a2514 100644 --- a/tests/tcg/aarch64/gdbstub/test-sve-ioctl.py +++ b/tests/tcg/aarch64/gdbstub/test-sve-ioctl.py @@ -8,19 +8,10 @@ from __future__ import print_function # import gdb -import sys +from test_gdbstub import main, report initial_vlen = 0 -failcount = 0 -def report(cond, msg): - "Report success/fail of test" - if cond: - print ("PASS: %s" % (msg)) - else: - print ("FAIL: %s" % (msg)) - global failcount - failcount += 1 class TestBreakpoint(gdb.Breakpoint): def __init__(self, sym_name="__sve_ld_done"): @@ -64,26 +55,5 @@ def run_test(): gdb.execute("c") -# -# This runs as the script it sourced (via -x, via run-test.py) -# -try: - inferior = gdb.selected_inferior() - arch = inferior.architecture() - report(arch.name() == "aarch64", "connected to aarch64") -except (gdb.error, AttributeError): - print("SKIPPING (not connected)", file=sys.stderr) - exit(0) - -try: - # Run the actual tests - run_test() -except: - print ("GDB Exception: %s" % (sys.exc_info()[0])) - failcount += 1 - import code - code.InteractiveConsole(locals=globals()).interact() - raise -print("All tests complete: %d failures" % failcount) -exit(failcount) +main(run_test, expected_arch="aarch64")