* [PATCH][gdb/testsuite] Fix gdb.multi/multi-term-settings.exp
@ 2021-09-28 17:57 Tom de Vries
2021-09-28 18:14 ` Pedro Alves
0 siblings, 1 reply; 5+ messages in thread
From: Tom de Vries @ 2021-09-28 17:57 UTC (permalink / raw)
To: gdb-patches
Hi,
When running test-case gdb.multi/multi-term-settings.exp in conjunction with:
...
$ stress -c $(($(cat /proc/cpuinfo | grep -c ^processor) + 1))
...
I run into:
...
(gdb) PASS: gdb.multi/multi-term-settings.exp: \
inf1_how=attach: inf2_how=attach: info inferiors
pid=14783, count=59^M
pid=14783, count=60^M
...
pid=14783, count=118^M
pid=14783, count=119^M
pid=14778, count=90^M
pid=14778, count=91^M
pid=14778, count=92^M
pid=14778, count=93^M
pid=14778, count=94^M
pid=14778, count=95^M
PASS: gdb.multi/multi-term-settings.exp: inf1_how=attach: inf2_how=attach: continue
Quit^M
(gdb) FAIL: gdb.multi/multi-term-settings.exp: \
inf1_how=attach: inf2_how=attach: stop with control-c (SIGINT)
...
It occurred to me that the "Continuing." we see otherwise is not shown and
that it's possible that the control-C that is send is caught by gdb when
printing this.
Fix this by waiting for the "Continuing." message before sending control-C.
Tested on x86_64-linux.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=24929
Any comments?
Thanks,
- Tom
[gdb/testsuite] Fix gdb.multi/multi-term-settings.exp
---
gdb/testsuite/gdb.multi/multi-term-settings.exp | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/gdb.multi/multi-term-settings.exp b/gdb/testsuite/gdb.multi/multi-term-settings.exp
index 20ec03d94b3..5b6cedbe509 100644
--- a/gdb/testsuite/gdb.multi/multi-term-settings.exp
+++ b/gdb/testsuite/gdb.multi/multi-term-settings.exp
@@ -196,13 +196,22 @@ proc coretest {inf1_how inf2_how} {
set count2 0
set test "continue"
+ set counting 0
gdb_test_multiple $test $test {
+ -re "Continuing\\." {
+ set counting 1
+ exp_continue
+ }
-i $infs_spawn_ids -re "pid=$pid1, count=" {
- incr count1
+ if { $counting } {
+ incr count1
+ }
pass_or_exp_continue
}
-i $infs_spawn_ids -re "pid=$pid2, count=" {
- incr count2
+ if { $counting } {
+ incr count2
+ }
pass_or_exp_continue
}
-i $gdb_spawn_id -re "received signal SIGTTOU.*$gdb_prompt " {
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][gdb/testsuite] Fix gdb.multi/multi-term-settings.exp
2021-09-28 17:57 [PATCH][gdb/testsuite] Fix gdb.multi/multi-term-settings.exp Tom de Vries
@ 2021-09-28 18:14 ` Pedro Alves
2021-09-28 22:42 ` Tom de Vries
0 siblings, 1 reply; 5+ messages in thread
From: Pedro Alves @ 2021-09-28 18:14 UTC (permalink / raw)
To: Tom de Vries, gdb-patches
On 2021-09-28 6:57 p.m., Tom de Vries wrote:
> Hi,
>
> When running test-case gdb.multi/multi-term-settings.exp in conjunction with:
> ...
> $ stress -c $(($(cat /proc/cpuinfo | grep -c ^processor) + 1))
> ...
> I run into:
> ...
> (gdb) PASS: gdb.multi/multi-term-settings.exp: \
> inf1_how=attach: inf2_how=attach: info inferiors
> pid=14783, count=59^M
> pid=14783, count=60^M
> ...
> pid=14783, count=118^M
> pid=14783, count=119^M
> pid=14778, count=90^M
> pid=14778, count=91^M
> pid=14778, count=92^M
> pid=14778, count=93^M
> pid=14778, count=94^M
> pid=14778, count=95^M
> PASS: gdb.multi/multi-term-settings.exp: inf1_how=attach: inf2_how=attach: continue
> Quit^M
> (gdb) FAIL: gdb.multi/multi-term-settings.exp: \
> inf1_how=attach: inf2_how=attach: stop with control-c (SIGINT)
> ...
>
> It occurred to me that the "Continuing." we see otherwise is not shown and
> that it's possible that the control-C that is send is caught by gdb when
> printing this.
>
> Fix this by waiting for the "Continuing." message before sending control-C.
>
> Tested on x86_64-linux.
>
> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=24929
>
> Any comments?
>
Hmm, think rang a bell. I had posted a patch for this a few months back:
https://sourceware.org/pipermail/gdb-patches/2021-June/179503.html
The idea is the same, but my version is more complete, IMHO.
Sorry I didn't think of splitting that one out of the series at the time, this
could have been fixed all this time. :-/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][gdb/testsuite] Fix gdb.multi/multi-term-settings.exp
2021-09-28 18:14 ` Pedro Alves
@ 2021-09-28 22:42 ` Tom de Vries
2021-09-29 11:18 ` Pedro Alves
0 siblings, 1 reply; 5+ messages in thread
From: Tom de Vries @ 2021-09-28 22:42 UTC (permalink / raw)
To: Pedro Alves, gdb-patches
On 9/28/21 8:14 PM, Pedro Alves wrote:
> On 2021-09-28 6:57 p.m., Tom de Vries wrote:
>> Hi,
>>
>> When running test-case gdb.multi/multi-term-settings.exp in conjunction with:
>> ...
>> $ stress -c $(($(cat /proc/cpuinfo | grep -c ^processor) + 1))
>> ...
>> I run into:
>> ...
>> (gdb) PASS: gdb.multi/multi-term-settings.exp: \
>> inf1_how=attach: inf2_how=attach: info inferiors
>> pid=14783, count=59^M
>> pid=14783, count=60^M
>> ...
>> pid=14783, count=118^M
>> pid=14783, count=119^M
>> pid=14778, count=90^M
>> pid=14778, count=91^M
>> pid=14778, count=92^M
>> pid=14778, count=93^M
>> pid=14778, count=94^M
>> pid=14778, count=95^M
>> PASS: gdb.multi/multi-term-settings.exp: inf1_how=attach: inf2_how=attach: continue
>> Quit^M
>> (gdb) FAIL: gdb.multi/multi-term-settings.exp: \
>> inf1_how=attach: inf2_how=attach: stop with control-c (SIGINT)
>> ...
>>
>> It occurred to me that the "Continuing." we see otherwise is not shown and
>> that it's possible that the control-C that is send is caught by gdb when
>> printing this.
>>
>> Fix this by waiting for the "Continuing." message before sending control-C.
>>
>> Tested on x86_64-linux.
>>
>> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=24929
>>
>> Any comments?
>>
>
> Hmm, think rang a bell. I had posted a patch for this a few months back:
>
> https://sourceware.org/pipermail/gdb-patches/2021-June/179503.html
>
> The idea is the same, but my version is more complete, IMHO.
>
> Sorry I didn't think of splitting that one out of the series at the time, this
> could have been fixed all this time. :-/
>
Np. I applied the patch locally and it works for me.
Anything preventing this from going in now?
Thanks,
- Tom
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][gdb/testsuite] Fix gdb.multi/multi-term-settings.exp
2021-09-28 22:42 ` Tom de Vries
@ 2021-09-29 11:18 ` Pedro Alves
2021-09-29 13:56 ` Tom de Vries
0 siblings, 1 reply; 5+ messages in thread
From: Pedro Alves @ 2021-09-29 11:18 UTC (permalink / raw)
To: Tom de Vries, gdb-patches
On 2021-09-28 11:42 p.m., Tom de Vries wrote:
> On 9/28/21 8:14 PM, Pedro Alves wrote:
>> Hmm, think rang a bell. I had posted a patch for this a few months back:
>>
>> https://sourceware.org/pipermail/gdb-patches/2021-June/179503.html
>>
>> The idea is the same, but my version is more complete, IMHO.
>>
>> Sorry I didn't think of splitting that one out of the series at the time, this
>> could have been fixed all this time. :-/
>>
>
> Np. I applied the patch locally and it works for me.
>
> Anything preventing this from going in now?
Not really. Since you have it handy, can you push it?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][gdb/testsuite] Fix gdb.multi/multi-term-settings.exp
2021-09-29 11:18 ` Pedro Alves
@ 2021-09-29 13:56 ` Tom de Vries
0 siblings, 0 replies; 5+ messages in thread
From: Tom de Vries @ 2021-09-29 13:56 UTC (permalink / raw)
To: Pedro Alves, gdb-patches
On 9/29/21 1:18 PM, Pedro Alves wrote:
> On 2021-09-28 11:42 p.m., Tom de Vries wrote:
>> On 9/28/21 8:14 PM, Pedro Alves wrote:
>
>>> Hmm, think rang a bell. I had posted a patch for this a few months back:
>>>
>>> https://sourceware.org/pipermail/gdb-patches/2021-June/179503.html
>>>
>>> The idea is the same, but my version is more complete, IMHO.
>>>
>>> Sorry I didn't think of splitting that one out of the series at the time, this
>>> could have been fixed all this time. :-/
>>>
>>
>> Np. I applied the patch locally and it works for me.
>>
>> Anything preventing this from going in now?
>
> Not really. Since you have it handy, can you push it?
>
Done. Thanks for fixing this.
- Tom
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-09-29 13:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-28 17:57 [PATCH][gdb/testsuite] Fix gdb.multi/multi-term-settings.exp Tom de Vries
2021-09-28 18:14 ` Pedro Alves
2021-09-28 22:42 ` Tom de Vries
2021-09-29 11:18 ` Pedro Alves
2021-09-29 13:56 ` Tom de Vries
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).