From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH 15/27] Use clean_restart in gdb.guile
Date: Wed, 25 Jan 2023 15:46:02 -0700 [thread overview]
Message-ID: <20230125224614.1006886-16-tom@tromey.com> (raw)
In-Reply-To: <20230125224614.1006886-1-tom@tromey.com>
Change gdb.guile to use clean_restart more consistently.
---
gdb/testsuite/gdb.guile/guile.exp | 5 +----
gdb/testsuite/gdb.guile/scm-gsmob.exp | 6 +-----
gdb/testsuite/gdb.guile/scm-objfile-script.exp | 6 +-----
gdb/testsuite/gdb.guile/scm-parameter.exp | 5 +----
gdb/testsuite/gdb.guile/scm-pretty-print.exp | 15 ++-------------
gdb/testsuite/gdb.guile/scm-progspace.exp | 6 +-----
gdb/testsuite/gdb.guile/scm-section-script.exp | 10 ++--------
gdb/testsuite/gdb.guile/scm-symbol.exp | 6 +-----
gdb/testsuite/gdb.guile/scm-type.exp | 5 +----
9 files changed, 11 insertions(+), 53 deletions(-)
diff --git a/gdb/testsuite/gdb.guile/guile.exp b/gdb/testsuite/gdb.guile/guile.exp
index 7c7dd3a3826..4db2f7cd309 100644
--- a/gdb/testsuite/gdb.guile/guile.exp
+++ b/gdb/testsuite/gdb.guile/guile.exp
@@ -18,10 +18,7 @@
load_lib gdb-guile.exp
-# Start with a fresh gdb.
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
+clean_restart
# Do this instead of the skip_guile_check.
# We want to do some tests when Guile is not present.
diff --git a/gdb/testsuite/gdb.guile/scm-gsmob.exp b/gdb/testsuite/gdb.guile/scm-gsmob.exp
index a7c95c01c11..726c97cbb92 100644
--- a/gdb/testsuite/gdb.guile/scm-gsmob.exp
+++ b/gdb/testsuite/gdb.guile/scm-gsmob.exp
@@ -20,11 +20,7 @@ load_lib gdb-guile.exp
require allow_guile_tests
-# Start with a fresh gdb.
-gdb_exit
-gdb_start
-
-gdb_reinitialize_dir $srcdir/$subdir
+clean_restart
gdb_install_guile_utils
gdb_install_guile_module
diff --git a/gdb/testsuite/gdb.guile/scm-objfile-script.exp b/gdb/testsuite/gdb.guile/scm-objfile-script.exp
index 5b480d1ea55..6a935d7926c 100644
--- a/gdb/testsuite/gdb.guile/scm-objfile-script.exp
+++ b/gdb/testsuite/gdb.guile/scm-objfile-script.exp
@@ -26,10 +26,6 @@ if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
return
}
-# Start with a fresh gdb.
-gdb_exit
-gdb_start
-
# Make the -gdb.scm script available to gdb, it is automagically loaded by gdb.
# Care is taken to put it in the same directory as the binary so that
# gdb will find it.
@@ -37,7 +33,7 @@ set remote_guile_file [remote_download host \
${srcdir}/${subdir}/${testfile}-gdb.in \
[standard_output_file ${testfile}-gdb.scm]]
-gdb_reinitialize_dir $srcdir/$subdir
+clean_restart
gdb_test_no_output "set auto-load safe-path ${remote_guile_file}" \
"set auto-load safe-path"
gdb_load ${binfile}
diff --git a/gdb/testsuite/gdb.guile/scm-parameter.exp b/gdb/testsuite/gdb.guile/scm-parameter.exp
index 9ee50d152cd..2e9d9ed9a5d 100644
--- a/gdb/testsuite/gdb.guile/scm-parameter.exp
+++ b/gdb/testsuite/gdb.guile/scm-parameter.exp
@@ -20,10 +20,7 @@ load_lib gdb-guile.exp
require allow_guile_tests
-# Start with a fresh gdb.
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
+clean_restart
gdb_install_guile_utils
gdb_install_guile_module
diff --git a/gdb/testsuite/gdb.guile/scm-pretty-print.exp b/gdb/testsuite/gdb.guile/scm-pretty-print.exp
index 3c20edf5061..41c840b6898 100644
--- a/gdb/testsuite/gdb.guile/scm-pretty-print.exp
+++ b/gdb/testsuite/gdb.guile/scm-pretty-print.exp
@@ -22,10 +22,6 @@ require allow_guile_tests
standard_testfile
-# Start with a fresh gdb.
-gdb_exit
-gdb_start
-
proc run_lang_tests {exefile lang} {
with_test_prefix "lang=$lang" {
global srcdir subdir srcfile testfile hex
@@ -37,10 +33,7 @@ proc run_lang_tests {exefile lang} {
set nl "\[\r\n\]+"
# Start with a fresh gdb.
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load ${exefile}
+ clean_restart $exefile
if ![gdb_guile_runto_main] {
return
@@ -121,11 +114,7 @@ run_lang_tests "${binfile}-cxx" "c++"
# Run various other tests.
-# Start with a fresh gdb.
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart $binfile
if ![gdb_guile_runto_main] {
return
diff --git a/gdb/testsuite/gdb.guile/scm-progspace.exp b/gdb/testsuite/gdb.guile/scm-progspace.exp
index c12a81e8ed1..0007f3742d7 100644
--- a/gdb/testsuite/gdb.guile/scm-progspace.exp
+++ b/gdb/testsuite/gdb.guile/scm-progspace.exp
@@ -26,11 +26,7 @@ if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
return -1
}
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
+clean_restart
gdb_install_guile_utils
gdb_install_guile_module
diff --git a/gdb/testsuite/gdb.guile/scm-section-script.exp b/gdb/testsuite/gdb.guile/scm-section-script.exp
index 9e52939aae3..ae0e484c3b7 100644
--- a/gdb/testsuite/gdb.guile/scm-section-script.exp
+++ b/gdb/testsuite/gdb.guile/scm-section-script.exp
@@ -46,11 +46,7 @@ if {[build_executable $testfile.exp $testfile $srcfile \
return
}
-# Start with a fresh gdb.
-gdb_exit
-gdb_start
-
-gdb_reinitialize_dir $srcdir/$subdir
+clean_restart
# Try first with a restrictive safe-path.
@@ -71,9 +67,7 @@ gdb_test_multiple "info auto-load guile-scripts" "$test_name" {
# Try again with a working safe-path.
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
+clean_restart
gdb_test_no_output "set auto-load safe-path ${remote_guile_file}:${binfile}" \
"set auto-load safe-path"
diff --git a/gdb/testsuite/gdb.guile/scm-symbol.exp b/gdb/testsuite/gdb.guile/scm-symbol.exp
index fa2cf778284..5680a7f176a 100644
--- a/gdb/testsuite/gdb.guile/scm-symbol.exp
+++ b/gdb/testsuite/gdb.guile/scm-symbol.exp
@@ -141,11 +141,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}-cxx" executable "
return -1
}
-# Start with a fresh gdb.
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}-cxx
+clean_restart ${binfile}-cxx
if ![gdb_guile_runto_main] {
return
diff --git a/gdb/testsuite/gdb.guile/scm-type.exp b/gdb/testsuite/gdb.guile/scm-type.exp
index 45139cba0d5..a5eec3aee37 100644
--- a/gdb/testsuite/gdb.guile/scm-type.exp
+++ b/gdb/testsuite/gdb.guile/scm-type.exp
@@ -38,10 +38,7 @@ proc build_inferior {exefile lang} {
proc restart_gdb {exefile} {
global srcdir subdir
- gdb_exit
- gdb_start
- gdb_reinitialize_dir $srcdir/$subdir
- gdb_load ${exefile}
+ clean_restart $exefile
if { ![allow_guile_tests] } {
return 0
--
2.39.1
next prev parent reply other threads:[~2023-01-25 22:46 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-25 22:45 [PATCH 00/27] Many small testsuite cleanups Tom Tromey
2023-01-25 22:45 ` [PATCH 01/27] Use ordinary calling convention for clean_restart Tom Tromey
2023-01-25 22:45 ` [PATCH 02/27] Use clean_restart in gdb.dlang Tom Tromey
2023-01-25 22:45 ` [PATCH 03/27] Eliminate spurious returns from the test suite Tom Tromey
2023-01-25 22:45 ` [PATCH 04/27] Remove some dead code in gdb.fortran/info-types.exp Tom Tromey
2023-01-25 22:45 ` [PATCH 05/27] Minor "require" fixups Tom Tromey
2023-01-25 22:45 ` [PATCH 06/27] Remove unnecessary call to standard_testfile Tom Tromey
2023-01-25 22:45 ` [PATCH 07/27] Start gdb after building executable in mi-basics.exp Tom Tromey
2023-01-25 22:45 ` [PATCH 08/27] Use mi_clean_restart more Tom Tromey
2023-01-25 22:45 ` [PATCH 09/27] Use clean_restart in gdb.pascal Tom Tromey
2023-01-25 22:45 ` [PATCH 10/27] Use clean_restart in gdb.linespec Tom Tromey
2023-01-25 22:45 ` [PATCH 11/27] Use clean_restart in gdb.opencl Tom Tromey
2023-01-25 22:45 ` [PATCH 12/27] Use clean_restart in gdb.trace Tom Tromey
2023-01-26 17:34 ` Pedro Alves
2023-01-26 18:34 ` Tom Tromey
2023-01-27 0:36 ` Tom Tromey
2023-01-25 22:46 ` [PATCH 13/27] Use clean_restart in gdb.objc Tom Tromey
2023-01-25 22:46 ` [PATCH 14/27] Use clean_restart in gdb.threads Tom Tromey
2023-01-25 22:46 ` Tom Tromey [this message]
2023-01-25 22:46 ` [PATCH 16/27] Use clean_restart in gdb.arch Tom Tromey
2023-01-25 22:46 ` [PATCH 17/27] Use clean_restart in gdb.reverse Tom Tromey
2023-01-25 22:46 ` [PATCH 18/27] Use clean_restart in gdb.dwarf2 Tom Tromey
2023-01-25 22:46 ` [PATCH 19/27] Use clean_restart in gdb.ada Tom Tromey
2023-01-25 22:46 ` [PATCH 20/27] Use clean_restart in gdb.fortran Tom Tromey
2023-01-25 22:46 ` [PATCH 21/27] Use clean_restart in gdb.stabs Tom Tromey
2023-01-25 22:46 ` [PATCH 22/27] Use clean_restart in gdb.go Tom Tromey
2023-01-25 22:46 ` [PATCH 23/27] Use clean_restart in gdb.perf Tom Tromey
2023-01-25 22:46 ` [PATCH 24/27] Use clean_restart in gdb.disasm Tom Tromey
2023-01-25 22:46 ` [PATCH 25/27] Use clean_restart in gdb.cp Tom Tromey
2023-01-25 22:46 ` [PATCH 26/27] Use clean_restart in gdb.python Tom Tromey
2023-01-25 22:46 ` [PATCH 27/27] Use clean_restart in gdb.base Tom Tromey
2023-01-26 17:37 ` [PATCH 00/27] Many small testsuite cleanups Pedro Alves
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=20230125224614.1006886-16-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).