Re: [PATCH] Fix batch exit status test failure on Fedora 28

Pedro Alves
2018-09-04T11:39:32Z

On 09/03/2018 05:12 PM, Gary Benson wrote:
> Pedro Alves <palves@redhat.com> wrote:
>> Yeah, if we compare with gdb.base/quit.exp, that is missing
>> as well as the "remote_close host" call. For the latter, when I last
>> touched quit.exp, I remember fretting a bit about whether the remote_close
>> was really necessary, but in the end decided to keep it, I don't recall
>> exactly if I kept it because I found it's necessary (probably for
>> remote hosts), or because it doesn't hurt.
>>
>> Now that I look at gdb.base/quit.exp again, I see that
>> gdb.base/batch-exit-status.exp can hang forever in the same way that
>> 15763a09d4ae fixed, isn't it? Gary, any reason you didn't do the
>> "eof" thing here too?
>
> I didn't realize what it did; I thought it was something specific to
> that test. And I thought the gdb_exit at the start of the test would
> clear $gdb_spawn_id but apparently not! :) So I made a fix, basically
> copied and pasted from the commit you referenced:
>
> This commit changes the batch exit status test to detect GDB's exit
> using gdb_test_multiple expecting 'eof', instead of using 'wait'.

> This fixes failures reported by buildbot on Fedora 28, and also means

Please expand here what the failure was, for the logs. Something concise
mentioning gdb_spawn_id, doesn't have to be long. It just should be more
self contained so that someone reading back the logs later on understands
what it was.

> the testcase won't hang forever on failure as fixed in
> gdb.base/quit.exp by commit 15763a09d4aea85fc3153d6746c040dd48565637.

Please write the commit in Linux-commit-style:

commit 15763a09d4ae ("Fix 'gdb.base/quit.exp hangs forever' if
the test fails").

to help the human reading the logs.

> Is this ok to commit?

OK.

Thanks,
Pedro Alves