Skip to content

Commit

Permalink
[gdb/testsuite] Fix gdb.threads/threadcrash.exp with glibc debuginfo
Browse files Browse the repository at this point in the history
After installing glibc debuginfo, I ran into:
...
FAIL: gdb.threads/threadcrash.exp: test_live_inferior: \
  $thread_count == [llength $test_list]
...

This happens because the clause:
...
	-re "^\r\n${hs}main$hs$eol" {
...
which is intended to match only:
...
 #1  <hex> in main () at threadcrash.c:423^M
...
also matches "remaining" in:
...
 #1  <hex> in __GI___nanosleep (requested_time=<hex>, remaining=<hex>) at \
   nanosleep.c:27^M
...

Fix this by checking for "in main" instead.

Tested on x86_64-linux.
  • Loading branch information
vries committed Apr 24, 2024
1 parent 3b3e209 commit e6a0a28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gdb/testsuite/gdb.threads/threadcrash.exp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ proc thread_apply_all {} {
lappend test_list 6
exp_continue
}
-re "^\r\n${hs}main$hs$eol" {
-re "^\r\n${hs}in main$hs$eol" {
lappend test_list 7
exp_continue
}
Expand Down

0 comments on commit e6a0a28

Please sign in to comment.