From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [RFC 3/5] Use "critical ensure_gdb_index" in gdb.rust
Date: Sat, 15 Apr 2023 09:13:34 -0600 [thread overview]
Message-ID: <20230415151336.4104455-4-tom@tromey.com> (raw)
In-Reply-To: <20230415151336.4104455-1-tom@tromey.com>
This converts gdb.rust to use "critical ensure_gdb_index" rather than
"if".
---
gdb/testsuite/gdb.base/with-mf.exp | 5 +----
gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp | 10 ++--------
gdb/testsuite/gdb.dwarf2/gdb-add-index.exp | 5 +----
gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp | 5 +----
gdb/testsuite/gdb.rust/dwindex.exp | 5 +----
5 files changed, 6 insertions(+), 24 deletions(-)
diff --git a/gdb/testsuite/gdb.base/with-mf.exp b/gdb/testsuite/gdb.base/with-mf.exp
index f26d48e1026..5ae4234056f 100644
--- a/gdb/testsuite/gdb.base/with-mf.exp
+++ b/gdb/testsuite/gdb.base/with-mf.exp
@@ -24,10 +24,7 @@ if {[prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2" \
return -1
}
-if { [ensure_gdb_index $binfile] == -1 } {
- untested "error adding gdb index"
- return -1
-}
+critical ensure_gdb_index $binfile
clean_restart $binfile
diff --git a/gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp b/gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp
index d6f96ab9f5b..0654249e302 100644
--- a/gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp
+++ b/gdb/testsuite/gdb.dwarf2/gdb-add-index-symlink.exp
@@ -30,10 +30,7 @@ with_test_prefix non-symlink {
return -1
}
- if { [ensure_gdb_index $binfile] == -1 } {
- untested "error adding gdb index"
- return -1
- }
+ critical ensure_gdb_index $binfile
}
# Regenerate exec without index.
@@ -48,10 +45,7 @@ if { ![file exists $symlink] } {
file link -symbolic $symlink $binfile
}
-if { [ensure_gdb_index $symlink] == -1 } {
- fail "Unable to call gdb-add-index with a symlink to a symfile"
- return -1
-}
+critical ensure_gdb_index $symlink
# Ok, we have a copy of $binfile with an index.
# Restart gdb and verify the index was used.
diff --git a/gdb/testsuite/gdb.dwarf2/gdb-add-index.exp b/gdb/testsuite/gdb.dwarf2/gdb-add-index.exp
index 4ecf4408c38..849680314da 100644
--- a/gdb/testsuite/gdb.dwarf2/gdb-add-index.exp
+++ b/gdb/testsuite/gdb.dwarf2/gdb-add-index.exp
@@ -25,10 +25,7 @@ if { [prepare_for_testing "failed to prepare" "${testfile}" \
return -1
}
-if { [ensure_gdb_index $binfile] == -1 } {
- untested "error adding gdb index"
- return -1
-}
+critical ensure_gdb_index $binfile
# Ok, we have a copy of $binfile with an index.
# Restart gdb and verify the index was used.
diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp b/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp
index dea3f3fe461..1227a66f643 100644
--- a/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp
+++ b/gdb/testsuite/gdb.dwarf2/imported-unit-runto-main.exp
@@ -72,10 +72,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \
return -1
}
-if { [ensure_gdb_index $binfile] == -1 } {
- untested "error adding gdb index"
- return -1
-}
+critical ensure_gdb_index $binfile
clean_restart ${binfile}
diff --git a/gdb/testsuite/gdb.rust/dwindex.exp b/gdb/testsuite/gdb.rust/dwindex.exp
index 1a82c2e92fe..0b7e3911ab1 100644
--- a/gdb/testsuite/gdb.rust/dwindex.exp
+++ b/gdb/testsuite/gdb.rust/dwindex.exp
@@ -25,10 +25,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
return -1
}
-if {[ensure_gdb_index $binfile -dwarf-5] == -1} {
- untested "error adding gdb index"
- return -1
-}
+critical ensure_gdb_index $binfile -dwarf-5
gdb_exit
gdb_start
--
2.39.2
next prev parent reply other threads:[~2023-04-15 15:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-15 15:13 [RFC 0/5] Add new "critical" command to test suite Tom Tromey
2023-04-15 15:13 ` [RFC 1/5] Bug fix in prepare_for_testing Tom Tromey
2023-04-15 15:13 ` [RFC 2/5] Introduce the "critical" testsuite command Tom Tromey
2023-04-15 23:35 ` Kevin Buettner
2023-04-15 15:13 ` Tom Tromey [this message]
2023-04-15 15:13 ` [RFC 4/5] Use "critical prepare_for_testing" in gdb.rust Tom Tromey
2023-04-15 15:13 ` [RFC 5/5] Use "critical runto" " Tom Tromey
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=20230415151336.4104455-4-tom@tromey.com \
--to=tom@tromey.com \
--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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).