aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.python/py-cmd.exp
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2023-03-10 16:34:04 +0100
committerTom de Vries <tdevries@suse.de>2023-03-10 16:34:04 +0100
commit254de2628f5e6da0c0d48eb86f40ece3d96b7b75 (patch)
treee1c7723615241dca8a50b7b94c59f30576c067a6 /gdb/testsuite/gdb.python/py-cmd.exp
parentddc003b7ded07645cec7d14284ea317b29c8c336 (diff)
downloadbinutils-254de2628f5e6da0c0d48eb86f40ece3d96b7b75.zip
binutils-254de2628f5e6da0c0d48eb86f40ece3d96b7b75.tar.gz
binutils-254de2628f5e6da0c0d48eb86f40ece3d96b7b75.tar.bz2
[gdb/testsuite] Fix gdb.python/py-cmd.exp
[ Using $pp as shorthand for the pagination prompt "--Type <RET> for more, q to quit, c to continue without paging--". ] The test-case gdb.python/py-cmd.exp passes, but the handling of the test_multiline command output looks a bit odd: ... (gdb) test_multiline test_multiline output ... test_multiline output $ppPASS: gdb.python/py-cmd.exp: verify pagination from test_multiline q test_multiline Quit (gdb) test_multiline test_multiline output ... test_multiline output $ppPASS: gdb.python/py-cmd.exp: verify pagination from test_multiline: q ... What happens is: - a test_multiline command is issued - some output is printed, followed by a pagination prompt - the test-case concludes that pagination occurred, and produces a PASS - "q\n" is replied to the pagination prompt - without waiting for response to the "q\n", another test_multiline command is issued - in response to the "q\n" we get "Quit\n(gdb) " - some output is printed, followed by a pagination prompt - the test-case concludes that there's a valid response to the "q\n", and produces a PASS, consuming the second pagination prompt, but without a reply. My conclusion is that the second test_multiline command is unintentional, so fix this by removing it. Without it, we have the more straightforward: ... (gdb) test_multiline test_multiline output ... test_multiline output $ppPASS: gdb.python/py-cmd.exp: verify pagination from test_multiline q Quit (gdb) PASS: gdb.python/py-cmd.exp: verify pagination from test_multiline: q ... This also fixes the following warning with target board native-gdbserver: ... WARNING: Timed out waiting for EOF in server after monitor exit ... Tested on x86_64-linux.
Diffstat (limited to 'gdb/testsuite/gdb.python/py-cmd.exp')
-rw-r--r--gdb/testsuite/gdb.python/py-cmd.exp2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.python/py-cmd.exp b/gdb/testsuite/gdb.python/py-cmd.exp
index 016ea44..12b52e4 100644
--- a/gdb/testsuite/gdb.python/py-cmd.exp
+++ b/gdb/testsuite/gdb.python/py-cmd.exp
@@ -291,7 +291,7 @@ gdb_test_multiple "test_multiline" $test {
send_gdb "q\n"
set test "verify pagination from test_multiline: q"
-gdb_test_multiple "test_multiline" $test {
+gdb_test_multiple "" $test {
-re "Error occurred in Python" {
fail $test
}