aboutsummaryrefslogtreecommitdiff
path: root/gdb/cp-namespace.c
diff options
context:
space:
mode:
authorLancelot SIX <lancelot.six@amd.com>2022-04-14 18:21:04 +0100
committerLancelot SIX <lancelot.six@amd.com>2022-04-14 18:27:51 +0100
commitd0632031920eeb48e28664ab18e0402a93b9f224 (patch)
tree078233f24013f2805e77095b377057c3ef1f7139 /gdb/cp-namespace.c
parentdb7127461e1598b9a86ab2c2a365ea0c28d38817 (diff)
downloadgdb-d0632031920eeb48e28664ab18e0402a93b9f224.zip
gdb-d0632031920eeb48e28664ab18e0402a93b9f224.tar.gz
gdb-d0632031920eeb48e28664ab18e0402a93b9f224.tar.bz2
gdb/testsuite: Fix race in gdb.dwarf2/calling-convention.exp
Pedro Alves warned me that there is a race in gdb.dwarf2/calling-convention.exp making the test sometimes fail on his setup. This can be reliably reproduced using : make check-read1 TESTS="gdb.dwarf2/calling-convention.exp" The relevant part of the gdb.log file is: return 35 Function 'foo' does not follow the target calling convention. If you continue, setting the return value will probably lead to unpredictable behaviors. Make foo return now? (y or n) PASS: gdb.dwarf2/calling-convention.exp: return 35 n Not confirmed (gdb) FAIL: gdb.dwarf2/calling-convention.exp: finish The issue is that when doing the test for "return 35", the DejaGnu test sends "n" (to tell GDB not to perform the return action) but never consumes the "Not confirmed" acknowledgment sent by GDB. Later, when trying to do the next test, DejaGnu tries to match the leftover output from the "return" test. As this output is not expected, the test fails. Fix by using gdb_test to send the "n" answer and match the confirmation and consume all output to the prompt. Also do minor adjustments to the main regex: - Remove the leading ".*" which is not required. - Ensure that the "?" from the question is properly escaped. Tested on x86_64-gnu-linux, using - make check TESTS="gdb.dwarf2/calling-convention.exp" - make check-read1 TESTS="gdb.dwarf2/calling-convention.exp" - make check-readmore TESTS="gdb.dwarf2/calling-convention.exp" Co-authored-by: Pedro Alves <pedro@palves.net> Change-Id: I42858b13db2cbd623c5c1739de65ad423e0c0938
Diffstat (limited to 'gdb/cp-namespace.c')
0 files changed, 0 insertions, 0 deletions