Some of our Python scripts still include the line
from __future__ import print_function
which is intended to allow a Python 2 to handle the Python 3 print()
syntax. This particular part of the future arrived many years ago,
and our minimum Python version is 3.9, so we don't need to keep
this line around.
NB: the scripts in tests/tcg/*/gdbstub/ are run with whatever Python
gdb was built against, but we can safely assume that that was a
Python 3 because our supported distros are all on Python 3. In any
case these are only run as part of "make check-tcg", not by
end-users.
Commit created with:
sed -i -e '/import print_function/d' $(git grep -l 'from __future__')
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id:
20250819102409.
2117969-1-peter.maydell@linaro.org
# 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 __future__ import print_function
from bcc import BPF
from ctypes import c_ushort, c_int, c_ulonglong
from time import sleep
"""Helper functions for gdbstub testing
"""
-from __future__ import print_function
import argparse
import gdb
import os
-from __future__ import print_function
#
# Test GDB memory-tag commands that exercise the stubs for the qIsAddressTagged,
# qMemTag, and QMemTag packets, which are used for manipulating allocation tags.
-from __future__ import print_function
#
# Test the SVE ZReg reports the right amount of data. It uses the
# sve-ioctl test and examines the register data each time the
-from __future__ import print_function
#
# Test the SVE registers are visible and changeable via gdbstub
#
-from __future__ import print_function
#
# Test some of the system debug features with the multiarch memory
# test. It is a port of the original vmlinux focused test case but
-from __future__ import print_function
#
# Test some of the system debug features with the multiarch memory
# test. It is a port of the original vmlinux focused test case but
-from __future__ import print_function
#
# A very simple smoke test for debugging the SHA1 userspace test on
# each target.
"""Test that gdbstub has access to proc mappings.
This runs as a sourced script (via -x, via run-test.py)."""
-from __future__ import print_function
import gdb
from test_gdbstub import gdb_exit, main, report
-from __future__ import print_function
#
# Test auxiliary vector is loaded via gdbstub
#
-from __future__ import print_function
#
# Test gdbstub Xfer:siginfo:read stub.
#
-from __future__ import print_function
#
# Test auxiliary vector is loaded via gdbstub
#
-from __future__ import print_function
#
# Test that signals and debugging mix well together on s390x.
"""Test single-stepping SVC.
This runs as a sourced script (via -x, via run-test.py)."""
-from __future__ import print_function
import gdb
from test_gdbstub import main, report