This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_gdb failed
Type: compile error Stage: resolved
Components: Tests Versions: Python 3.6
process
Status: closed Resolution: duplicate
Dependencies: Superseder: pythoninfo collect_gdb() blows up when gdb fails to run
View: 40436
Assigned To: Nosy List: MarcoC, vstinner, xtreak
Priority: normal Keywords:

Created on 2017-03-01 15:42 by MarcoC, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (3)
msg288760 - (view) Author: Marco (MarcoC) Date: 2017-03-01 15:42
make test output

studio@linux:~/Python-3.6.0> ./python -m test -v test_gdb
== CPython 3.6.0 (default, Mar 1 2017, 15:51:48) [GCC 4.8.5]
==   Linux-4.4.49-16-default-x86_64-with-SuSE-42.2-x86_64 little-endian
==   hash algorithm: siphash24 64bit
==  cwd: /home/studio/Python-3.6.0/build/test_python_32667
==  encodings: locale=UTF-8, FS=utf-8
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0)
Run tests sequentially
0:00:00 [1/1] test_gdb
test test_gdb crashed -- Traceback (most recent call last):
  File "/home/studio/Python-3.6.0/Lib/test/libregrtest/runtest.py", line 152, in runtest_inner
    the_module = importlib.import_module(abstest)
  File "/home/studio/Python-3.6.0/Lib/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 978, in _gcd_import
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load
  File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
  File "/home/studio/Python-3.6.0/Lib/test/test_gdb.py", line 46, in <module>
    gdb_version, gdb_major_version, gdb_minor_version = get_gdb_version()
  File "/home/studio/Python-3.6.0/Lib/test/test_gdb.py", line 43, in get_gdb_version
    raise Exception("unable to parse GDB version: %r" % version)
Exception: unable to parse GDB version: ''

test_gdb failed

1 test failed:
    test_gdb

Total duration: 31 ms
Tests result: FAILURE
msg326207 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2018-09-24 07:36
Can you please add your GDB version? The version parsing is done with regex r"^GNU gdb.*?\b(\d+)\.(\d+)" and I think it's not matching your version which seems to be empty. Adding the output of `gdb -nx --version` will be helpful in debugging this since the output is the string used against the regex.

Thanks
msg371275 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-06-11 13:22
I believe that this issue is a duplicated of bpo-40436 which was fixed by:

commit ec9bea4a3766bd815148a27f61eb24e7dd459ac7
Author: Victor Stinner <vstinner@python.org>
Date:   Wed Apr 29 17:11:48 2020 +0200

    bpo-40436: Fix code parsing gdb version (GH-19792)
    
    test_gdb and test.pythoninfo now check gdb command exit code.


If it's not the case, please provide more information, as requested.
History
Date User Action Args
2022-04-11 14:58:43adminsetgithub: 73871
2020-06-11 13:22:55vstinnersetstatus: open -> closed

superseder: pythoninfo collect_gdb() blows up when gdb fails to run

nosy: + vstinner
messages: + msg371275
resolution: duplicate
stage: resolved
2018-09-24 07:36:46xtreaksetnosy: + xtreak
messages: + msg326207
2017-03-01 15:42:34MarcoCcreate