[2/3,gdb/testsuite] Remove superfluous -quiet and -ex set width/height 0

Message ID 20240417165800.23467-2-tdevries@suse.de
State New
Headers
Series [1/3,gdb/testsuite] Update INTERNAL_GDBFLAGS example |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Testing passed

Commit Message

Tom de Vries April 17, 2024, 4:57 p.m. UTC
  INTERNAL_GDBFLAGS contains:
- -quiet
- -iex "set width 0"
- -iex "set height 0"

There are test-cases that add these once more.

Clean this up.

Tested on x86_64-linux.

PR testsuite/31649
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31649
---
 gdb/testsuite/gdb.base/attach.exp                       | 3 +--
 gdb/testsuite/gdb.base/batch-preserve-term-settings.exp | 1 -
 gdb/testsuite/gdb.base/bp-cmds-execution-x-script.exp   | 1 -
 gdb/testsuite/gdb.base/dprintf-execution-x-script.exp   | 1 -
 gdb/testsuite/gdb.base/new-ui-pending-input.exp         | 2 --
 gdb/testsuite/gdb.base/paginate-execution-startup.exp   | 1 -
 gdb/testsuite/gdb.python/py-prompt.exp                  | 2 --
 gdb/testsuite/gdb.server/server-kill-python.exp         | 6 ++----
 gdb/testsuite/lib/debuginfod-support.exp                | 4 ++--
 9 files changed, 5 insertions(+), 16 deletions(-)
  

Patch

diff --git a/gdb/testsuite/gdb.base/attach.exp b/gdb/testsuite/gdb.base/attach.exp
index 7907441054b..83412fd5f14 100644
--- a/gdb/testsuite/gdb.base/attach.exp
+++ b/gdb/testsuite/gdb.base/attach.exp
@@ -496,8 +496,7 @@  proc_with_prefix test_command_line_attach_run {} {
     set test "run to prompt"
     gdb_exit
 
-    set res [gdb_spawn_with_cmdline_opts \
-		 "-quiet -iex \"set height 0\" -iex \"set width 0\" --pid=$testpid -ex \"start\""]
+    set res [gdb_spawn_with_cmdline_opts "--pid=$testpid -ex \"start\""]
     if { $res != 0} {
 	fail $test
 	kill_wait_spawned_process $test_spawn_id
diff --git a/gdb/testsuite/gdb.base/batch-preserve-term-settings.exp b/gdb/testsuite/gdb.base/batch-preserve-term-settings.exp
index fbaba634e20..dc2b1ce617e 100644
--- a/gdb/testsuite/gdb.base/batch-preserve-term-settings.exp
+++ b/gdb/testsuite/gdb.base/batch-preserve-term-settings.exp
@@ -139,7 +139,6 @@  proc test_terminal_settings_preserved {} {
 
     set test "gdb -batch -ex run"
     append EXTRA_GDBFLAGS "-batch"
-    append EXTRA_GDBFLAGS " -ex \"set height unlimited\""
     append EXTRA_GDBFLAGS " -ex \"start\""
     append EXTRA_GDBFLAGS " --args \"$file_arg\""
     send_gdb "$GDB $INTERNAL_GDBFLAGS $GDBFLAGS $EXTRA_GDBFLAGS [host_info gdb_opts]\n"
diff --git a/gdb/testsuite/gdb.base/bp-cmds-execution-x-script.exp b/gdb/testsuite/gdb.base/bp-cmds-execution-x-script.exp
index 02719b1a7af..25adf015b7f 100644
--- a/gdb/testsuite/gdb.base/bp-cmds-execution-x-script.exp
+++ b/gdb/testsuite/gdb.base/bp-cmds-execution-x-script.exp
@@ -42,7 +42,6 @@  proc test {} {
     set GDBFLAGS "$GDBFLAGS -x $x_file $binfile"
 
     set GDBFLAGS $saved_gdbflags
-    append GDBFLAGS " -ex \"set height unlimited\""
     append GDBFLAGS " -x \"$x_file\""
     append GDBFLAGS " --args \"$binfile\""
 
diff --git a/gdb/testsuite/gdb.base/dprintf-execution-x-script.exp b/gdb/testsuite/gdb.base/dprintf-execution-x-script.exp
index af6dd3f9003..12de3aec494 100644
--- a/gdb/testsuite/gdb.base/dprintf-execution-x-script.exp
+++ b/gdb/testsuite/gdb.base/dprintf-execution-x-script.exp
@@ -37,7 +37,6 @@  set x_file ${srcdir}/${subdir}/$testfile.gdb
 # outside of the save_vars block.)
 save_vars { GDBFLAGS } {
     # Set flags with which to start GDB.
-    append GDBFLAGS " -ex \"set height unlimited\""
     append GDBFLAGS " -x \"$x_file\""
     append GDBFLAGS " --args \"$binfile\""
 
diff --git a/gdb/testsuite/gdb.base/new-ui-pending-input.exp b/gdb/testsuite/gdb.base/new-ui-pending-input.exp
index dc19055264b..cfb7ca09434 100644
--- a/gdb/testsuite/gdb.base/new-ui-pending-input.exp
+++ b/gdb/testsuite/gdb.base/new-ui-pending-input.exp
@@ -60,8 +60,6 @@  proc test_command_line_new_ui_pending_input {} {
     set bpline [gdb_get_line_number "set breakpoint here"]
 
     set options ""
-    append options " -iex \"set height 0\""
-    append options " -iex \"set width 0\""
     append options " -iex \"new-ui console $extra_tty_name\""
     append options " -ex \"b $bpline\""
     append options " -ex \"run\""
diff --git a/gdb/testsuite/gdb.base/paginate-execution-startup.exp b/gdb/testsuite/gdb.base/paginate-execution-startup.exp
index 3f0e74e5efa..f0f7db5932c 100644
--- a/gdb/testsuite/gdb.base/paginate-execution-startup.exp
+++ b/gdb/testsuite/gdb.base/paginate-execution-startup.exp
@@ -38,7 +38,6 @@  proc probe_can_run_cmdline  {} {
     global gdb_prompt
 
     set GDBFLAGS $saved_gdbflags
-    append GDBFLAGS " -ex \"set height 0\""
     append GDBFLAGS " -ex \"start\""
     append GDBFLAGS " --args \"$file_arg\""
 
diff --git a/gdb/testsuite/gdb.python/py-prompt.exp b/gdb/testsuite/gdb.python/py-prompt.exp
index b37d2fbd3eb..f1f93bff572 100644
--- a/gdb/testsuite/gdb.python/py-prompt.exp
+++ b/gdb/testsuite/gdb.python/py-prompt.exp
@@ -32,8 +32,6 @@  save_vars { INTERNAL_GDBFLAGS } {
 
     global GDBFLAGS
     set saved_gdbflags $GDBFLAGS
-    set GDBFLAGS [concat $GDBFLAGS " -ex \"set height 0\""]
-    set GDBFLAGS [concat $GDBFLAGS " -ex \"set width 0\""]
     set GDBFLAGS [concat $GDBFLAGS " -ex \"python p = list()\""]
     set prompt_func "python def foo(x): global p; p.append(x);  return \'(Foo) \'"
     set GDBFLAGS [concat $GDBFLAGS " -ex \"$prompt_func\""]
diff --git a/gdb/testsuite/gdb.server/server-kill-python.exp b/gdb/testsuite/gdb.server/server-kill-python.exp
index f02c69c502f..e9066caa6cb 100644
--- a/gdb/testsuite/gdb.server/server-kill-python.exp
+++ b/gdb/testsuite/gdb.server/server-kill-python.exp
@@ -55,10 +55,8 @@  close $fd
 
 set host_file1 [gdb_remote_download host $file1]
 
-# Now start GDB, sourcing the python command file we generated above.
-# Set the height and width so we don't end up at a paging prompt.
-if {[gdb_spawn_with_cmdline_opts \
-	 "-quiet -iex \"set height 0\" -iex \"set width 0\""] != 0} {
+# Now start GDB.
+if {[gdb_spawn]} {
     fail "spawn"
     return
 }
diff --git a/gdb/testsuite/lib/debuginfod-support.exp b/gdb/testsuite/lib/debuginfod-support.exp
index bd70a1dfcab..0096448567e 100644
--- a/gdb/testsuite/lib/debuginfod-support.exp
+++ b/gdb/testsuite/lib/debuginfod-support.exp
@@ -35,9 +35,9 @@  proc allow_debuginfod_tests {} {
     #
     # If GDB is built with ASan, it warns that some signal handlers
     # (installed by ASan) exist on startup.  That makes TCL's exec throw an
-    # error.  Disable that by passing --quiet.
+    # error.  This is dealt with by the --quiet in INTERNAL_GDBFLAGS.
     if { [string first "with-debuginfod" \
-	      [eval exec $::GDB --quiet $::INTERNAL_GDBFLAGS \
+	      [eval exec $::GDB $::INTERNAL_GDBFLAGS \
 		   --configuration]] == -1 } {
 	return false
     }