cpython/Lib/test/support
Victor Stinner bbce8bd05d
[3.12] gh-109972: Enhance test_gdb (#110026) (#110351)
* gh-109972: Enhance test_gdb (#110026)

* Split test_pycfunction.py: add test_cfunction_full.py.
  Split the function into the following 6 functions. In verbose
  mode, these "pycfunction" tests now log each tested call.

  * test_pycfunction_noargs()
  * test_pycfunction_o()
  * test_pycfunction_varargs()
  * test_pycfunction_varargs_keywords()
  * test_pycfunction_fastcall()
  * test_pycfunction_fastcall_keywords()

* Move get_gdb_repr() to PrettyPrintTests.
* Replace DebuggerTests.get_sample_script() with SAMPLE_SCRIPT.
* Rename checkout_hook_path to CHECKOUT_HOOK_PATH.
* Rename gdb_version to GDB_VERSION_TEXT.
* Replace (gdb_major_version, gdb_minor_version) with GDB_VERSION.
* run_gdb() uses "backslashreplace" error handler instead of "replace".
* Add check_gdb() function to util.py.
* Enhance support.check_cflags_pgo(): check also for sysconfig
  PGO_PROF_USE_FLAG (if available) in compiler flags.
* Move some SkipTest checks to test_gdb/__init__.py.
* Elaborate why gdb cannot be tested on Windows: gdb doesn't support
  PDB debug symbol files.

(cherry picked from commit 757cbd4f29)

* gh-104736: Fix test_gdb tests on ppc64le with clang (#109360)

Fix test_gdb on Python built with LLVM clang 16 on Linux ppc64le (ex:
Fedora 38). Search patterns in gdb "bt" command output to detect
when gdb fails to retrieve the traceback. For example, skip a test if
"Backtrace stopped: frame did not save the PC" is found.

(cherry picked from commit 44d9a71ea2)

* gh-110166: Fix gdb CFunctionFullTests on ppc64le clang build (#110331)

CFunctionFullTests now also runs "bt" command before "py-bt-full",
similar to CFunctionTests which also runs "bt" command before
"py-bt". So test_gdb can skip the test if patterns like "?? ()" are
found in the gdb output.

(cherry picked from commit 1de9406f91)
2023-10-04 11:34:28 +00:00
..
_hypothesis_stubs GH-86275: Implementation of hypothesis stubs for property-based tests, with zoneinfo tests (#22863) 2023-05-12 08:35:53 -04:00
__init__.py [3.12] gh-109972: Enhance test_gdb (#110026) (#110351) 2023-10-04 11:34:28 +00:00
ast_helper.py gh-100518: Add tests for ast.NodeTransformer (#100521) 2023-01-21 21:44:41 +00:00
asynchat.py gh-72719: Remove asyncore and asynchat modules (#96580) 2022-11-08 16:48:58 +01:00
asyncore.py gh-102799: use sys.exception() instead of sys.exc_info() in tests (#103293) 2023-04-06 11:08:25 +01:00
bytecode_helper.py gh-104615: don't make unsafe swaps in apply_static_swaps (#104620) 2023-05-18 21:22:03 +00:00
hashlib_helper.py
hypothesis_helper.py [3.12] Disable differing_test_runners health check (GH-108886) (#108887) 2023-09-04 21:11:16 +02:00
import_helper.py [3.12] gh-109625: Move _ready_to_import() from test_import to support.import_helper (GH-109626) (#109640) 2023-10-02 17:35:03 +02:00
interpreters.py [3.12] Update test.support.interpreters to include missing RunFailedError import (GH-103841) (#106110) 2023-06-26 18:11:48 +02:00
logging_helper.py
os_helper.py gh-100809: Fix handling of drive-relative paths in pathlib.Path.absolute() (GH-100812) 2023-02-17 14:08:14 +00:00
script_helper.py bpo-40280: Skip subprocess-based tests on wasm32-emscripten (GH-30615) 2022-01-25 08:09:06 +01:00
socket_helper.py [3.12] gh-109015: Add test.support.socket_helper.tcp_blackhole() (GH-109016) (#109041) 2023-09-08 15:12:29 +02:00
testcase.py gh-103791: Make contextlib.suppress also act on exceptions within an ExceptionGroup (#103792) 2023-04-24 22:17:02 +00:00
testresult.py [3.12] gh-108834: Sync libregrtest with the main branch (#108966) 2023-09-08 15:14:17 +02:00
threading_helper.py [3.12] gh-104812: Run Pending Calls in any Thread (gh-104813) (gh-105752) 2023-06-14 00:50:08 +00:00
warnings_helper.py gh-103109: Document ignore_warnings() test support helper (#103110) 2023-04-03 00:18:25 +02:00