* [PATCH] [gdb/testsuite] fix gdb.multi/checkpoint-multi.exp without symbols
@ 2025-09-30 19:01 Sébastien Darche
2025-10-04 0:02 ` Kevin Buettner
0 siblings, 1 reply; 3+ messages in thread
From: Sébastien Darche @ 2025-09-30 19:01 UTC (permalink / raw)
To: gdb-patches; +Cc: Sébastien Darche
The checkpoint-multi.exp test stops a program while it is sleeping
using a call to the usleep() function from libc. The test checks whether
the inferior is running by matching for "<running>" (if the inferior
is running) or a hex address followed by a function name, ideally, if
the inferior is stopped.
On most systems this works fine :
(gdb) info checkpoints
Id Active Target Id Frame
* 1.0 y process 1546841 at 0x00007ffff7ceca7a, <clock_nanosleep>
1.1 n process 1547177 at 0x00005555555551f0, file /home/sdarche/binutils-gdb/build-x86/gdb/testsuite/../../../gdb/testsuite/gdb.multi/hello.c, line 51
2.0 y process 1547076 at 0x0000555555555243, file /home/sdarche/binutils-gdb/build-x86/gdb/testsuite/../../../gdb/testsuite/gdb.multi/goodbye.c, line 46
2.1 n process 1547120 at 0x0000555555555285, file /home/sdarche/binutils-gdb/build-x86/gdb/testsuite/../../../gdb/testsuite/gdb.multi/goodbye.c, line 61
I have found however that the output from `info checkpoints` is
different on some systems with (stripped) versions of the libc without
debug infos :
(gdb) info checkpoints
Id Active Target Id Frame
* 1.0 y process 979642 at 0x00007ffff7e49687
1.1 n process 979647 at 0x00005555555551ac, file /home/sdarche/binutils-gdb/build/gdb/testsuite/../../../gdb/testsuite/gdb.multi/hello.c, line 51
2.0 y process 979645 at 0x000055555555523b, file /home/sdarche/binutils-gdb/build/gdb/testsuite/../../../gdb/testsuite/gdb.multi/goodbye.c, line 46
2.1 n process 979646 at 0x0000555555555271, file /home/sdarche/binutils-gdb/build/gdb/testsuite/../../../gdb/testsuite/gdb.multi/goodbye.c, line 61
Where the frame can be found, but GDB cannot find the function. This
fails the last two tests in checkpoint-multi.exp on those system, even
though the behaviour is as expected.
This patch removes the comma from the regex that matches with the frame
number. The test now passes fine on the system.
Change-Id: Iced4931d77f647046c87889455264cb169f480ff
---
gdb/testsuite/gdb.multi/checkpoint-multi.exp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/gdb.multi/checkpoint-multi.exp b/gdb/testsuite/gdb.multi/checkpoint-multi.exp
index 8439b8dfbb4..54fd3ca9787 100644
--- a/gdb/testsuite/gdb.multi/checkpoint-multi.exp
+++ b/gdb/testsuite/gdb.multi/checkpoint-multi.exp
@@ -781,7 +781,7 @@ with_test_prefix "background execution" {
gdb_test "info checkpoints" \
[multi_line \
"$checkpoints_header_re" \
- "\\* 1\\.0 y +$proc_re +at $::hex,.*" \
+ "\\* 1\\.0 y +$proc_re +at $::hex.*" \
" 1\\.1 n +$proc_re +at $::hex, file.*?$hello_c.*?" \
" 2\\.0 y +$proc_re +at $::hex, file.*?$goodbye_c.*?" \
" 2\\.1 n +$proc_re +at $::hex, file.*?$goodbye_c.*?"]
@@ -792,7 +792,7 @@ with_test_prefix "background execution" {
gdb_test "info checkpoints" \
[multi_line \
"$checkpoints_header_re" \
- " 1\\.0 y +$proc_re +at $::hex,.*" \
+ " 1\\.0 y +$proc_re +at $::hex.*" \
" 1\\.1 n +$proc_re +at $::hex, file.*?$hello_c.*?" \
" 2\\.0 n +$proc_re +at $::hex, file.*?$goodbye_c.*?" \
"\\* 2\\.1 y +$proc_re +at $::hex, file.*?$goodbye_c.*?"]
--
2.51.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [gdb/testsuite] fix gdb.multi/checkpoint-multi.exp without symbols
2025-09-30 19:01 [PATCH] [gdb/testsuite] fix gdb.multi/checkpoint-multi.exp without symbols Sébastien Darche
@ 2025-10-04 0:02 ` Kevin Buettner
2025-10-08 20:13 ` Sébastien Darche
0 siblings, 1 reply; 3+ messages in thread
From: Kevin Buettner @ 2025-10-04 0:02 UTC (permalink / raw)
To: Sébastien Darche; +Cc: gdb-patches
On Tue, 30 Sep 2025 15:01:30 -0400
Sébastien Darche <sdarche@efficios.com> wrote:
> The checkpoint-multi.exp test stops a program while it is sleeping
> using a call to the usleep() function from libc. The test checks whether
> the inferior is running by matching for "<running>" (if the inferior
> is running) or a hex address followed by a function name, ideally, if
> the inferior is stopped.
>
> On most systems this works fine :
>
> (gdb) info checkpoints
> Id Active Target Id Frame
> * 1.0 y process 1546841 at 0x00007ffff7ceca7a, <clock_nanosleep>
> 1.1 n process 1547177 at 0x00005555555551f0, file /home/sdarche/binutils-gdb/build-x86/gdb/testsuite/../../../gdb/testsuite/gdb.multi/hello.c, line 51
> 2.0 y process 1547076 at 0x0000555555555243, file /home/sdarche/binutils-gdb/build-x86/gdb/testsuite/../../../gdb/testsuite/gdb.multi/goodbye.c, line 46
> 2.1 n process 1547120 at 0x0000555555555285, file /home/sdarche/binutils-gdb/build-x86/gdb/testsuite/../../../gdb/testsuite/gdb.multi/goodbye.c, line 61
>
> I have found however that the output from `info checkpoints` is
> different on some systems with (stripped) versions of the libc without
> debug infos :
>
> (gdb) info checkpoints
> Id Active Target Id Frame
> * 1.0 y process 979642 at 0x00007ffff7e49687
> 1.1 n process 979647 at 0x00005555555551ac, file /home/sdarche/binutils-gdb/build/gdb/testsuite/../../../gdb/testsuite/gdb.multi/hello.c, line 51
> 2.0 y process 979645 at 0x000055555555523b, file /home/sdarche/binutils-gdb/build/gdb/testsuite/../../../gdb/testsuite/gdb.multi/goodbye.c, line 46
> 2.1 n process 979646 at 0x0000555555555271, file /home/sdarche/binutils-gdb/build/gdb/testsuite/../../../gdb/testsuite/gdb.multi/goodbye.c, line 61
>
> Where the frame can be found, but GDB cannot find the function. This
> fails the last two tests in checkpoint-multi.exp on those system, even
> though the behaviour is as expected.
>
> This patch removes the comma from the regex that matches with the frame
> number. The test now passes fine on the system.
This is okay.
Approved-by: Kevin Buettner <kevinb@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [gdb/testsuite] fix gdb.multi/checkpoint-multi.exp without symbols
2025-10-04 0:02 ` Kevin Buettner
@ 2025-10-08 20:13 ` Sébastien Darche
0 siblings, 0 replies; 3+ messages in thread
From: Sébastien Darche @ 2025-10-08 20:13 UTC (permalink / raw)
To: Kevin Buettner; +Cc: gdb-patches
Thank you for your review. I just pushed the commit.
Sébastien
On 2025-10-03 20:02, Kevin Buettner wrote:
> On Tue, 30 Sep 2025 15:01:30 -0400
> Sébastien Darche <sdarche@efficios.com> wrote:
>
>> The checkpoint-multi.exp test stops a program while it is sleeping
>> using a call to the usleep() function from libc. The test checks whether
>> the inferior is running by matching for "<running>" (if the inferior
>> is running) or a hex address followed by a function name, ideally, if
>> the inferior is stopped.
>>
>> On most systems this works fine :
>>
>> (gdb) info checkpoints
>> Id Active Target Id Frame
>> * 1.0 y process 1546841 at 0x00007ffff7ceca7a, <clock_nanosleep>
>> 1.1 n process 1547177 at 0x00005555555551f0, file /home/sdarche/binutils-gdb/build-x86/gdb/testsuite/../../../gdb/testsuite/gdb.multi/hello.c, line 51
>> 2.0 y process 1547076 at 0x0000555555555243, file /home/sdarche/binutils-gdb/build-x86/gdb/testsuite/../../../gdb/testsuite/gdb.multi/goodbye.c, line 46
>> 2.1 n process 1547120 at 0x0000555555555285, file /home/sdarche/binutils-gdb/build-x86/gdb/testsuite/../../../gdb/testsuite/gdb.multi/goodbye.c, line 61
>>
>> I have found however that the output from `info checkpoints` is
>> different on some systems with (stripped) versions of the libc without
>> debug infos :
>>
>> (gdb) info checkpoints
>> Id Active Target Id Frame
>> * 1.0 y process 979642 at 0x00007ffff7e49687
>> 1.1 n process 979647 at 0x00005555555551ac, file /home/sdarche/binutils-gdb/build/gdb/testsuite/../../../gdb/testsuite/gdb.multi/hello.c, line 51
>> 2.0 y process 979645 at 0x000055555555523b, file /home/sdarche/binutils-gdb/build/gdb/testsuite/../../../gdb/testsuite/gdb.multi/goodbye.c, line 46
>> 2.1 n process 979646 at 0x0000555555555271, file /home/sdarche/binutils-gdb/build/gdb/testsuite/../../../gdb/testsuite/gdb.multi/goodbye.c, line 61
>>
>> Where the frame can be found, but GDB cannot find the function. This
>> fails the last two tests in checkpoint-multi.exp on those system, even
>> though the behaviour is as expected.
>>
>> This patch removes the comma from the regex that matches with the frame
>> number. The test now passes fine on the system.
> This is okay.
>
> Approved-by: Kevin Buettner <kevinb@redhat.com>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-10-08 20:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-30 19:01 [PATCH] [gdb/testsuite] fix gdb.multi/checkpoint-multi.exp without symbols Sébastien Darche
2025-10-04 0:02 ` Kevin Buettner
2025-10-08 20:13 ` Sébastien Darche
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox