[PATCH][gdb/testsuite] Fix gdb.threads/killed-outside.exp with -m32

Luis Machado luis.machado@linaro.org
Tue Apr 13 13:33:02 GMT 2021


I was looking at this test on aarch64-linux/x86_64-linux Ubuntu 20.04 
and noticed inconsistent output. I'm trying to assess what is the best 
course of action.

On 1/18/21 8:44 AM, Tom de Vries wrote:
> Hi,
> 
> When running test-case gdb.threads/killed-outside.exp with target board
> unix/-m32, we run into:
> ...
> (gdb) PASS: gdb.threads/killed-outside.exp: get pid of inferior
> Executing on target: kill -9 10969    (timeout = 300)
> spawn -ignore SIGHUP kill -9 10969^M
> continue^M
> Continuing.^M
> [Thread 0xf7cb4b40 (LWP 10973) exited]^M
> ^M
> Program terminated with signal SIGKILL, Killed.^M
> The program no longer exists.^M
> (gdb) FAIL: gdb.threads/killed-outside.exp: prompt after first continue
> ...
> 
> Fix this by allowing this output.
> 
> Tested on x86_64-linux.
> 
> Any comments?
> 
> Thanks,
> - Tom


I see the following output, most of the time:

Executing on target: kill -9 3742839    (timeout = 300)
spawn -ignore SIGHUP kill -9 3742839^M
continue^M
Continuing.^M
Unable to fetch general registers.: No such process.^M
(gdb) [Thread 0xfffff7e281e0 (LWP 3742842) exited]^M
^M
Program terminated with signal SIGKILL, Killed.^M
The program no longer exists.^M
FAIL: gdb.threads/killed-outside.exp: prompt after first continue (timeout)

But I also see the following with READ1:

Executing on target: kill -9 3743271    (timeout = 300)
spawn -ignore SIGHUP kill -9 3743271^M
continue^M
Continuing.^M
Unable to fetch general registers.: No such process.^M
(gdb) FAIL: gdb.threads/killed-outside.exp: prompt after first continue

Besides the messages not being the same, there is some odd inconsistency 
with the prompt positioning compared to what you mentioned above.

Forcing scheduler-locking to on made the output consistent for both 
cases, but I was left wondering if enabling scheduler-locking would 
cause the bug to not be reproducible anymore.

Thoughts?


More information about the Gdb-patches mailing list