diff options
author | Pedro Alves <pedro@palves.net> | 2022-03-30 14:31:56 +0100 |
---|---|---|
committer | Pedro Alves <pedro@palves.net> | 2022-05-17 11:13:39 +0100 |
commit | ed01945057cfdf048bc025f15b410492e12283f6 (patch) | |
tree | ce5ce6bf090e7290c390356e132236339a740ce7 /binutils | |
parent | d7440bee9ffa6767e704f226ec28b9aa2fb748d6 (diff) | |
download | binutils-ed01945057cfdf048bc025f15b410492e12283f6.zip binutils-ed01945057cfdf048bc025f15b410492e12283f6.tar.gz binutils-ed01945057cfdf048bc025f15b410492e12283f6.tar.bz2 |
Make gdb_test's question non-optional if specified
gdb_test supports handling scenarios where GDB asks a question before
finishing handling some command. The full prototype of gdb_test is:
# gdb_test COMMAND PATTERN MESSAGE QUESTION RESPONSE
However, QUESTION is a question that GDB _may_ ask, not one that GDB
_must_ ask:
# QUESTION is a question GDB may ask in response to COMMAND, like
# "are you sure?"
# RESPONSE is the response to send if QUESTION appears.
If GDB doesn't raise the question, the test still passes.
I think that this is a misfeature. If GDB regresses and stops asking
a question, the testsuite won't notice. So I think that if a QUESTION
is specified, gdb_test should ensure it comes out of GDB.
Running the testsuite exposed a number of tests that pass
QUESTION/RESPONSE to GDB, but no question comes out. The previous
commits fixed them all, so this commit changes gdb_test's behavior.
A related issue is that gdb_test doesn't enforce that if you specify
QUESTION, that you also specify RESPONSE. I.e., you should pass 1, 2,
3, or 5 arguments to gdb_test, but never 4, or more than 5. Making
gdb_test detect bogus arguments actually regressed some testcases,
also all fixed in previous commits.
Change-Id: I47c39c9034e6a6841129312037a5ca4c5811f0db
Diffstat (limited to 'binutils')
0 files changed, 0 insertions, 0 deletions