From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [committed][gdb/testsuite] Bail out after gdb_start error in gdb.threads/attach-slow-waitpid.exp
Date: Mon, 20 Jul 2020 10:55:25 +0200 [thread overview]
Message-ID: <20200720085523.GA2335@delia> (raw)
Hi,
When building gdb using CFLAGS/CXXFLAGS+=-fsanitizer=address and
LDFLAGS+=-lasan, and running test-case gdb.threads/attach-slow-waitpid.exp,
we get:
...
spawn gdb -nw -nx -data-directory data-directory^M
==16079==ASan runtime does not come first in initial library list; \
you should either link runtime to your application or manually preload \
it with LD_PRELOAD.^M
ERROR: (eof) GDB never initialized.
ERROR: : spawn id exp10 not open
while executing
"expect {
-i exp10 -timeout 120
-re "Kill the program being debugged. .y or n. $" {
send_gdb "y\n" answer
verbose "\t\tKilling previous pro..."
("uplevel" body line 1)
invoked from within
"uplevel $body" NONE : spawn id exp10 not open
WARNING: remote_expect statement without a default case
ERROR: : spawn id exp10 not open
while executing
"expect {
-i exp10 -timeout 120
-re "Reading symbols from.*LZMA support was disabled.*$gdb_prompt $" {
verbose "\t\tLoaded $arg into $GDB; .gnu_..."
("uplevel" body line 1)
invoked from within
"uplevel $body" NONE : spawn id exp10 not open
ERROR: Couldn't load attach-slow-waitpid into GDB (eof).
ERROR: Couldn't send attach 16070 to GDB.
UNRESOLVED: gdb.threads/attach-slow-waitpid.exp: attach to target
...
Bail out at the first ERROR, such that we have instead:
...
ERROR: (eof) GDB never initialized.
UNTESTED: gdb.threads/attach-slow-waitpid.exp: \
Couldn't start GDB with preloaded lib
...
Tested on x86_64-linux.
Committed to trunk.
Thanks,
- Tom
[gdb/testsuite] Bail out after gdb_start error in gdb.threads/attach-slow-waitpid.exp
gdb/testsuite/ChangeLog:
2020-07-20 Tom de Vries <tdevries@suse.de>
* gdb.threads/attach-slow-waitpid.exp: Bail out if gdb_start fails.
---
gdb/testsuite/gdb.threads/attach-slow-waitpid.exp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp b/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp
index a7005a0f9b..a294f7158f 100644
--- a/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp
+++ b/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp
@@ -88,7 +88,12 @@ set test_spawn_id [spawn_wait_for_attach $binfile]
set testpid [spawn_id_get_pid $test_spawn_id]
# Start GDB with preload library in place.
-gdb_spawn_with_ld_preload $libobj
+if { [gdb_spawn_with_ld_preload $libobj] == -1 } {
+ # Make sure we get UNTESTED rather than UNRESOLVED.
+ set errcnt 0
+ untested "Couldn't start GDB with preloaded lib"
+ return -1
+}
# Load binary, and attach to running program.
gdb_load ${binfile}
reply other threads:[~2020-07-20 8:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200720085523.GA2335@delia \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox