* [pushed 1/2] [gdb/testsuite] Fix gdb.threads/threadcrash.exp with glibc debuginfo
@ 2024-04-24 13:36 Tom de Vries
2024-04-24 13:36 ` [pushed 2/2] [gdb/testsuite] Fix gdb.threads/threadcrash.exp for remote host Tom de Vries
0 siblings, 1 reply; 2+ messages in thread
From: Tom de Vries @ 2024-04-24 13:36 UTC (permalink / raw)
To: gdb-patches
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.
---
gdb/testsuite/gdb.threads/threadcrash.exp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.threads/threadcrash.exp b/gdb/testsuite/gdb.threads/threadcrash.exp
index c72ce73fd6d..ffbfd83942c 100644
--- a/gdb/testsuite/gdb.threads/threadcrash.exp
+++ b/gdb/testsuite/gdb.threads/threadcrash.exp
@@ -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
}
base-commit: 3b3e2090118966e3b885ae578440e380dc90e648
--
2.35.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* [pushed 2/2] [gdb/testsuite] Fix gdb.threads/threadcrash.exp for remote host
2024-04-24 13:36 [pushed 1/2] [gdb/testsuite] Fix gdb.threads/threadcrash.exp with glibc debuginfo Tom de Vries
@ 2024-04-24 13:36 ` Tom de Vries
0 siblings, 0 replies; 2+ messages in thread
From: Tom de Vries @ 2024-04-24 13:36 UTC (permalink / raw)
To: gdb-patches
With test-case gdb.threads/threadcrash.exp using host board local-remote-host
and target board remote-gdbserver-on-localhost I run into:
...
(gdb) PASS: gdb.threads/threadcrash.exp: test_gcore: continue to crash
gcore $outputs/gdb.threads/threadcrash/threadcrash.gcore^M
Failed to open '$outputs/gdb.threads/threadcrash/threadcrash.gcore' for output.^M
(gdb) FAIL: gdb.threads/threadcrash.exp: test_gcore: saving gcore
UNSUPPORTED: gdb.threads/threadcrash.exp: test_gcore: couldn't generate gcore file
...
The problem is that the gcore command tries to save a file on a remote host,
but the filename is a location on build.
Fix this by using host_standard_output_file.
Tested on x86_64-linux.
---
gdb/testsuite/gdb.threads/threadcrash.exp | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/gdb/testsuite/gdb.threads/threadcrash.exp b/gdb/testsuite/gdb.threads/threadcrash.exp
index ffbfd83942c..6da70736983 100644
--- a/gdb/testsuite/gdb.threads/threadcrash.exp
+++ b/gdb/testsuite/gdb.threads/threadcrash.exp
@@ -251,17 +251,15 @@ proc_with_prefix test_gcore {} {
}
gdb_test "continue" ".*Segmentation fault.*" "continue to crash"
- set gcore_name "${::binfile}.gcore"
- set gcore_supported [gdb_gcore_cmd "$gcore_name" "saving gcore"]
+ set gcore_host [host_standard_output_file $::testfile.gcore]
+ set gcore_supported [gdb_gcore_cmd "$gcore_host" "saving gcore"]
if {!$gcore_supported} {
unsupported "couldn't generate gcore file"
return
}
- set corefile [gdb_remote_download host $gcore_name]
-
- gdb_test "core-file $corefile" \
+ gdb_test "core-file $gcore_host" \
"" \
"loading_corefile" \
"A program is being debugged already\\\. Kill it\\\? \\\(y or n\\\) " \
--
2.35.3
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-24 13:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-24 13:36 [pushed 1/2] [gdb/testsuite] Fix gdb.threads/threadcrash.exp with glibc debuginfo Tom de Vries
2024-04-24 13:36 ` [pushed 2/2] [gdb/testsuite] Fix gdb.threads/threadcrash.exp for remote host 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).