summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_gdb.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-38239: Fix test_gdb for Link Time Optimization (LTO) (GH-16422)Victor Stinner2019-09-261-2/+9
|
* bpo-37499: Test various C calling conventions (GH-15776)Petr Viktorin2019-09-101-31/+50
| | | | | | | | | | Add functions with various calling conventions to `_testcapi`, expose them as module-level functions, bound methods, class methods, and static methods, and test calling them and introspecting them through GDB. https://bugs.python.org/issue37499 Co-authored-by: Jeroen Demeyer <J.Demeyer@UGent.be> Automerge-Triggered-By: @pganssle
* test_gdb: use unittest test discovery (GH-15405)Victor Stinner2019-08-231-11/+5
| | | | | | | Replace test.support.run_unittest() with unittest.main() to automatically discover test cases, instead of having an maintaing manually a list which may be incomplete. Remove also an unused variable.
* bpo-36974: separate vectorcall functions for each calling convention (GH-13781)Jeroen Demeyer2019-07-051-4/+4
|
* bpo-37362: test_gdb now ignores stderr (GH-14287)Victor Stinner2019-06-211-34/+13
| | | | | test_gdb no longer fails if it gets an "unexpected" message on stderr: it now ignores stderr. The purpose of test_gdb is to test that python-gdb.py commands work as expected, not to test gdb.
* test_gdb.test_pycfunction: test more calling conventions (GH-13668)Petr Viktorin2019-06-021-21/+34
| | | | | As the code paths for various METH_* conventions are diverging due to optimizations, we should check they continue to be covered by GDB integration.
* bpo-36974: Fix GDB integration (GH-13665)Petr Viktorin2019-05-291-1/+1
| | | | | | | | | | | As it changes the way functions are called, the PEP 590 implementation skipped the functions that the GDB integration is looking for (by name) to find function calls. Looking for the new helper `cfunction_call_varargs` hopefully fixes the tests, and thus buildbots. The changed frame nuber in test_gdb is due to there being fewer C calls when calling a built-in method.
* bpo-37023: Skip test_gdb under PGO (GH-13555)Steve Dower2019-05-241-1/+5
|
* bpo-35202: Remove unused imports in tests. (GH-10561)Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి)2018-11-161-1/+0
|
* bpo-21263: Skip test_gdb when python has been compiled with LLVM clang ↵Lysandros Nikolaou2018-11-041-0/+5
| | | | (GH-10318)
* bpo-32962: Fix test_gdb failure in debug build with -mcet -fcf-protection ↵Victor Stinner2018-10-091-1/+32
| | | | | | | | | | | | | -O0 (GH-9656) When Python is built with the intel control-flow protection flags, -mcet -fcf-protection, gdb is not able to read the stack without actually jumping inside the function. This means an extra 'next' command is required to make the $pc (program counter) enter the function and make the stack of the function exposed to gdb. Co-Authored-By: Marcel Plch <gmarcel.plch@gmail.com> (cherry picked from commit 9b7c74ca32d1bec7128d550a9ab1b2ddc7046287)
* bpo-34537: Fix test_gdb:test_strings with LC_ALL=C (GH-9483)Elvis Pranskevichus2018-09-221-1/+14
| | | | | | | | We cannot simply call locale.getpreferredencoding() here, as GDB might have been linked against a different version of Python with a different encoding and coercion policy with respect to PEP 538 and PEP 540. Thanks to Victor Stinner for a hint on how to fix this.
* bpo-34007: Skip traceback tests if the Program Counter is not available. ↵Pablo Galindo2018-08-311-0/+9
| | | | | | | | | (GH-9018) Sometimes some versions of the shared libraries that are part of the traceback are compiled in optimised mode and the Program Counter (PC) is not present, not allowing gdb to walk the frames back. When this happens, the Python bindings of gdb raise an exception, making the test impossible to succeed.
* Revert "bpo-32962: Fix test_gdb failure in debug build with -mcet ↵Victor Stinner2018-06-151-9/+2
| | | | | -fcf-protection -O0 (GH-6754)" (#7723) This reverts commit 9b7c74ca32d1bec7128d550a9ab1b2ddc7046287.
* bpo-32962: Fix test_gdb failure in debug build with -mcet -fcf-protection ↵Marcel Plch2018-06-151-2/+9
| | | | | | | | | -O0 (#6754) When Python is built with the intel control-flow protection flags, -mcet -fcf-protection, gdb is not able to read the stack without actually jumping inside the function. This means an extra 'next' command is required to make the $pc (program counter) enter the function and make the stack of the function exposed to gdb.
* bpo-31370: Remove support for threads-less builds (#3385)Antoine Pitrou2017-09-071-12/+0
| | | | | | * Remove Setup.config * Always define WITH_THREAD for compatibility.
* Issue #29263: LOAD_METHOD support for C methodsINADA Naoki2017-02-021-1/+1
| | | | Calling builtin method is at most 10% faster.
* Fix test_gdb.test_wrapper_call() on Python 2Victor Stinner2017-02-011-2/+2
| | | | Issue #29367. On Python 2, __init__ name is render as u'__init__'.
* Make test_gdb.test_wrapper_call() make reliableVictor Stinner2017-02-011-3/+2
| | | | | Issue #29367. Use two break points to prevent breakpoint during Python initialization.
* python-gdb.py supports method-wrapperVictor Stinner2017-02-011-1/+20
| | | | | Issue #29367: python-gdb.py now supports also method-wrapper (wrapperobject) objects.
* Update and enhance python-gdb.pyVictor Stinner2017-01-181-1/+1
| | | | | | | | Issue #29259: * Detect PyCFunction is the current frame, not only in the older frame * Ignore PyCFunction_Call() since it now calls _PyCFunction_FastCallDict(), and _PyCFunction_FastCallDict() is already detected
* Issue #28770: Update python-gdb.py for fastcallsVictor Stinner2016-11-221-10/+10
| | | | | | | | Frame.is_other_python_frame() now also handles _PyCFunction_FastCallDict() frames. Thanks to the new code to handle fast calls, python-gdb.py is now also able to detect the <built-in id method of module ...> frame.
* Issue #28023: Fix python-gdb.py didn't support new dict implementationINADA Naoki2016-11-221-6/+3
|
* #27364: fix "incorrect" uses of escape character in the stdlib.R David Murray2016-09-081-6/+6
| | | | | | | And most of the tools. Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and Martin Panter.
* Implement compact dictVictor Stinner2016-09-081-0/+3
| | | | | | | | | | | | Issue #27350: `dict` implementation is changed like PyPy. It is more compact and preserves insertion order. _PyDict_Dummy() function has been removed. Disable test_gdb: python-gdb.py is not updated yet to the new structure of compact dictionaries (issue #28023). Patch written by INADA Naoki.
* get skipIf from the right placeBenjamin Peterson2016-09-071-1/+1
|
* Adds test.support.PGO and skips tests that are not useful for PGO.Steve Dower2016-09-071-0/+1
|
* merge 3.5 (#27969)Benjamin Peterson2016-09-061-0/+1
|\
| * suppress stderr output when checking gdb (closes #27969)Benjamin Peterson2016-09-061-0/+1
| |
* | MergeRaymond Hettinger2016-08-261-1/+1
|\ \ | |/
| * Issue 19504: Change "customise" to "customize" American spelling.Raymond Hettinger2016-08-261-1/+1
| |
| * Backport test_gdb fix for s390x buildbotsVictor Stinner2016-04-191-17/+7
| |
* | Issue #23277: Remove unused imports in tests.Serhiy Storchaka2016-04-241-1/+0
| |
* | Try to fix test_gdb on s390x SLES 3.xVictor Stinner2016-03-231-0/+2
| | | | | | | | Ignore empty lines in stderr.
* | Try to fix test_gdb on s390x buildbotsVictor Stinner2016-03-231-17/+5
| |
* | Issue #25876: Fix also test_set() of test_gdb when -E command line is usedVictor Stinner2016-01-221-3/+6
| |
* | Issue #25876: test_gdb: use subprocess._args_from_interpreter_flags() to testVictor Stinner2016-01-221-4/+14
|/ | | | Python with more options.
* Issue #14771: Redirect GDB's stdin to avoid messing the terminal settingsMartin Panter2016-01-161-0/+3
| | | | | | | Otherwise, GDB seems to affect the terminal's foreground process group, interfering with test_ioctl, which does not expect the foreground process to change during the test. This change also solves the problem of the tests being stopped in the shell if test_gdb is run twice in parallel.
* Issue #25820: Remove unused assignment and redundant GDB CLI argumentsMartin Panter2015-12-081-3/+1
| | | | These were added in revision b71cda2f48c6.
* Merge 3.4 (test_gdb)Victor Stinner2015-09-141-1/+1
|\
| * test_gdb: fix regex to parse the GDB versionVictor Stinner2015-09-141-1/+1
| | | | | | | | Fix the regex to support the version 7.10: minor version with two digits
* | Merge 3.4 (test_gdb)Victor Stinner2015-09-031-2/+3
|\ \ | |/
| * test_gdb: oops, the regex to parse the gdb version was still too strictVictor Stinner2015-09-031-2/+3
| |
* | Merge 3.4 (test_gdb)Victor Stinner2015-09-031-1/+2
|\ \ | |/
| * test_gdb: fix regex to parse GDB version for 'GNU gdb 6.1.1 [FreeBSD]\n'Victor Stinner2015-09-031-1/+2
| |
* | Merge 3.4 (test_gdb)Victor Stinner2015-09-021-17/+33
|\ \ | |/
| * test_gdb: use subprocess.Popen context manager to fix ResourceWarning warningsVictor Stinner2015-09-021-20/+29
| | | | | | | | when the test is interrupted (or fail).
| * test_gdb: fix regex to parse gdb version for SUSE Linux EntrepriseVictor Stinner2015-09-021-4/+11
| | | | | | | | | | Mention also the detected GDB version on verbose mode and on error (if the major version is smaller than 7).
* | Issue #22117: Fix test_gdb for the new time.sleep()Victor Stinner2015-03-271-6/+8
|/ | | | | | | Use time.gmtime() instead of time.sleep(), because time.sleep() is no more declared with METH_VARARGS but with METH_O. time.gmtime() is still declared with METH_VARARGS and so it is called with PyCFunction_Call() which is the target of the test_gdb unit test.
* Issue #22844: Fized test_gdb failure on Debian Wheezy for Z.Serhiy Storchaka2015-02-141-0/+2
| | | | Patch by David Edelsohn.