aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-objfile.c
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2019-07-29 15:07:47 +0200
committerTom de Vries <tdevries@suse.de>2019-07-29 15:07:47 +0200
commit5beafce944b6b200d1fa80d7f4a8656cb2ecf2fa (patch)
tree6f8733d0a8aaded97e7c846df1643e3b8acabdd7 /gdb/python/py-objfile.c
parent2d274232f3e693d54f8dd561de73810d1a03ddf7 (diff)
downloadbinutils-5beafce944b6b200d1fa80d7f4a8656cb2ecf2fa.zip
binutils-5beafce944b6b200d1fa80d7f4a8656cb2ecf2fa.tar.gz
binutils-5beafce944b6b200d1fa80d7f4a8656cb2ecf2fa.tar.bz2
[gdb/testsuite] Fix python.exp with check-read1
when running python/python.exp with check-read1, we get: ... (gdb) PASS: gdb.python/python.exp: prompt substitution readline - end python gdb.prompt_hook = error_prompt^M Python Exception <type 'exceptions.RuntimeError'> Python exception calledPASS: gdb.python/python.exp: set hook : ^M (gdb) PASS: gdb.python/python.exp: set the hook to default python gdb.prompt_hook = None^M (gdb) PASS: gdb.python/python.exp: set print-stack full for prompt error test set python print-stack full^M (gdb) FAIL: gdb.python/python.exp: set the hook python gdb.prompt_hook = error_prompt^M Traceback (most recent call last):^M File "<string>", line 3, in error_prompt^M RuntimeError: Python exception called^M (gdb) FAIL: gdb.python/python.exp: set the hook to default ... The problem is that gdb_test_multiple here: ... gdb_test_multiple "python gdb.prompt_hook = error_prompt" "set the hook" { -re "Python Exception (exceptions.RuntimeError|<(type 'exceptions.|class ')RuntimeError'>) Python excepti on called.*" { pass "set hook" } } ... specifies a regexp that ends with ".*" but doesn't specify the expected $gdb_prompt. Consequently, due to check-read1, the ".*" is matched to "" and the remaining $gdb_prompt is read by the the following gdb_py_test_silent_cmd, which has its own $gdb_prompt read by the following gdb_py_test_silent_cmd, which has its own $gdb_prompt causing a mismatch for the following gdb_test_multiple: ... gdb_test_multiple "python gdb.prompt_hook = error_prompt" "set the hook" { -re "Traceback.*File.*line.*RuntimeError.*Python exception called.*" { pass "set hook" } } ... which causes both FAILs. The second gdb_test_multiple has the same problem as the first, but it happens not to cause a FAIL because it's followed by a gdb_py_test_silent_cmd and a clean_restart. Fix the regexps in both gdb_test_multiple calls. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2019-07-29 Tom de Vries <tdevries@suse.de> * gdb.python/python.exp: Don't terminate gdb_test_multiple regexp with ".*".
Diffstat (limited to 'gdb/python/py-objfile.c')
0 files changed, 0 insertions, 0 deletions