From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id 637323858D20; Fri, 27 Jan 2023 01:30:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 637323858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1674783001; bh=izpiIdV5QsMVS/teI4/Sxby89G2vO1cZ/lhodG5RXXc=; h=From:To:Subject:Date:From; b=mliVMiNF8fGQbsB8nFE1sQ8sJKoX79lYNURe6fjkNlGt+wa19xrfp/0gMXKL27Sda kzSRIHTVXnZdA20vgZGlTd6uq22TKI1rUw77AnEaw99ZW8T+znLQZX+J6zUyWfGxn2 Pgaf25U2xpvnTG0YdRFNMpX5yTTLtQOVMJH5+UKg= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Use clean_restart in gdb.guile X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: a30f2b7b7e689b3f1bd93c29a1e00c8d852145d3 X-Git-Newrev: 888438e2b4146f9b1021ea240f78f04975a9d925 Message-Id: <20230127013001.637323858D20@sourceware.org> Date: Fri, 27 Jan 2023 01:30:01 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D888438e2b414= 6f9b1021ea240f78f04975a9d925 commit 888438e2b4146f9b1021ea240f78f04975a9d925 Author: Tom Tromey Date: Wed Jan 25 10:39:53 2023 -0700 Use clean_restart in gdb.guile =20 Change gdb.guile to use clean_restart more consistently. Diff: --- 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/gu= ile.exp index 7c7dd3a3826..4db2f7cd309 100644 --- a/gdb/testsuite/gdb.guile/guile.exp +++ b/gdb/testsuite/gdb.guile/guile.exp @@ -18,10 +18,7 @@ =20 load_lib gdb-guile.exp =20 -# Start with a fresh gdb. -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir +clean_restart =20 # 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.guil= e/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 =20 require allow_guile_tests =20 -# Start with a fresh gdb. -gdb_exit -gdb_start - -gdb_reinitialize_dir $srcdir/$subdir +clean_restart =20 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 d= ebug] =3D=3D -1} { return } =20 -# 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]] =20 -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 =20 require allow_guile_tests =20 -# Start with a fresh gdb. -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir +clean_restart =20 gdb_install_guile_utils gdb_install_guile_module diff --git a/gdb/testsuite/gdb.guile/scm-pretty-print.exp b/gdb/testsuite/g= db.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 =20 standard_testfile =20 -# Start with a fresh gdb. -gdb_exit -gdb_start - proc run_lang_tests {exefile lang} { with_test_prefix "lang=3D$lang" { global srcdir subdir srcfile testfile hex @@ -37,10 +33,7 @@ proc run_lang_tests {exefile lang} { set nl "\[\r\n\]+" =20 # Start with a fresh gdb. - gdb_exit - gdb_start - gdb_reinitialize_dir $srcdir/$subdir - gdb_load ${exefile} + clean_restart $exefile =20 if ![gdb_guile_runto_main] { return @@ -121,11 +114,7 @@ run_lang_tests "${binfile}-cxx" "c++" =20 # Run various other tests. =20 -# Start with a fresh gdb. -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile} +clean_restart $binfile =20 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 d= ebug] =3D=3D -1} { return -1 } =20 -# Start with a fresh gdb. - -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir +clean_restart =20 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 } =20 -# Start with a fresh gdb. -gdb_exit -gdb_start - -gdb_reinitialize_dir $srcdir/$subdir +clean_restart =20 # Try first with a restrictive safe-path. =20 @@ -71,9 +67,7 @@ gdb_test_multiple "info auto-load guile-scripts" "$test_n= ame" { =20 # Try again with a working safe-path. =20 -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir +clean_restart =20 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.gui= le/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 } =20 -# Start with a fresh gdb. -gdb_exit -gdb_start -gdb_reinitialize_dir $srcdir/$subdir -gdb_load ${binfile}-cxx +clean_restart ${binfile}-cxx =20 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 =20 - gdb_exit - gdb_start - gdb_reinitialize_dir $srcdir/$subdir - gdb_load ${exefile} + clean_restart $exefile =20 if { ![allow_guile_tests] } { return 0