public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gdb/testsuite: don't delete command files in gdb.base/commands.exp
@ 2022-12-14 21:14 Simon Marchi
  2022-12-15 19:20 ` Tom Tromey
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Marchi @ 2022-12-14 21:14 UTC (permalink / raw)
  To: gdb-patches; +Cc: Simon Marchi

Don't delete the runtime-generated command files.  This makes it easier
to reproduce tests by hand.

Change-Id: I4e53484eea216512f1c5d7dfcb5c464b36950946
---
 gdb/testsuite/gdb.base/commands.exp | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/gdb/testsuite/gdb.base/commands.exp b/gdb/testsuite/gdb.base/commands.exp
index 933978c0ea10..929a48e47dc3 100644
--- a/gdb/testsuite/gdb.base/commands.exp
+++ b/gdb/testsuite/gdb.base/commands.exp
@@ -714,8 +714,6 @@ maintenance deprecate set qqq_aaa"
     gdb_test "set qqq_aaa" \
 	"Warning: 'set qqq_aaa', an alias for the command 'set xxx_yyy', is deprecated\\.\r\n.*No alternative known\\..*" \
 	"deprecated alias with prefix give a warning"
-
-    file delete $file1
 }
 
 # Test that the help for a command does not show deprecated aliases.
@@ -848,7 +846,7 @@ proc_with_prefix stray_arg0_test { } {
 
 # Test that GDB is able to source a file with an indented comment.
 proc_with_prefix source_file_with_indented_comment {} {
-    set file1 [standard_output_file file1]
+    set file1 [standard_output_file source_file_with_indented_comment]
 
     set fd [open "$file1" w]
     puts $fd \
@@ -864,9 +862,9 @@ echo Done!\n}
 # Test that GDB can handle arguments when sourcing files recursively.
 # If the arguments are overwritten with ####### then the test has failed.
 proc_with_prefix recursive_source_test {} {
-    set file1 [standard_output_file file1]
-    set file2 [standard_output_file file2]
-    set file3 [standard_output_file file3]
+    set file1 [standard_output_file recursive_source_1]
+    set file2 [standard_output_file recursive_source_2]
+    set file3 [standard_output_file recursive_source_3]
 
     set fd [open "$file1" w]
     puts $fd \
@@ -892,10 +890,6 @@ end"
     gdb_test "source $file1" \
 	"1: <<<qwerty>>>\[\r\n]+in file3\[\r\n]+2: <<<qwerty>>>" \
 	"source file"
-
-    file delete $file1
-    file delete $file2
-    file delete $file3
 }
 
 proc gdb_test_no_prompt { command result msg } {

base-commit: 5d80df4a109e7b648e324423a5fbc3c1ba02e816
-- 
2.38.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] gdb/testsuite: don't delete command files in gdb.base/commands.exp
  2022-12-14 21:14 [PATCH] gdb/testsuite: don't delete command files in gdb.base/commands.exp Simon Marchi
@ 2022-12-15 19:20 ` Tom Tromey
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Tromey @ 2022-12-15 19:20 UTC (permalink / raw)
  To: Simon Marchi via Gdb-patches; +Cc: Simon Marchi

>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:

Simon> Don't delete the runtime-generated command files.  This makes it easier
Simon> to reproduce tests by hand.

Seems like a good idea to me.

Tom

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-15 19:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-14 21:14 [PATCH] gdb/testsuite: don't delete command files in gdb.base/commands.exp Simon Marchi
2022-12-15 19:20 ` Tom Tromey

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).