[02/16] gdb/testsuite: add some xfail in gdb.base/startup-with-shell.exp

Message ID 5808a3f3b76fc376d908b820a28151553462a40f.1704809585.git.aburgess@redhat.com
State New
Headers
Series Inferior argument (inc for remote targets) changes |

Commit Message

Andrew Burgess Jan. 9, 2024, 2:26 p.m. UTC
  There are two tests that fail in gdb.base/startup-with-shell.exp when
using the native-extended-remote board.  I plan to fix these issues in
this series, but not straight away.

It is easier to test each patch if I can just check for no unexpected
failures, so first lets mark the currently failing tests as xfail.
This change will be removed by the end of this series, at which point
the tests will be passing.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28392
---
 gdb/testsuite/gdb.base/startup-with-shell.exp | 12 ++++++++++++
 1 file changed, 12 insertions(+)
  

Patch

diff --git a/gdb/testsuite/gdb.base/startup-with-shell.exp b/gdb/testsuite/gdb.base/startup-with-shell.exp
index 51b1e4fa922..f3ad4ec4cbb 100644
--- a/gdb/testsuite/gdb.base/startup-with-shell.exp
+++ b/gdb/testsuite/gdb.base/startup-with-shell.exp
@@ -55,10 +55,19 @@  proc initial_setup_simple { startup_with_shell run_args } {
     }
 }
 
+# Are we using 'remote' or 'extended-remote' protocol?
+set is_remote_p [expr [string equal [target_info gdb_protocol] \
+			   "remote"] \
+		     || [string equal [target_info gdb_protocol] \
+			     "extended-remote"]]
+
 ## Run the actual tests
 
 with_test_prefix "startup_with_shell = on; run_args = *.unique-extension" {
     initial_setup_simple "on" "$unique_file_dir/*.unique-extension"
+    if { $is_remote_p } {
+	setup_xfail "*-*-*" gdb/28392
+    }
     gdb_test "print argv\[1\]" "\\\$$decimal = $hex \"$unique_file\"" \
 	"first argument expanded"
 }
@@ -72,6 +81,9 @@  with_test_prefix "startup_with_shell = off; run_args = *.unique-extension" {
 with_test_prefix "startup_with_shell = on; run_args = \$TEST" {
     set env(TEST) "1234"
     initial_setup_simple "on" "\$TEST"
+    if { $is_remote_p } {
+	setup_xfail "*-*-*" gdb/28392
+    }
     gdb_test "print argv\[1\]" "\\\$$decimal = $hex \"1234\"" \
 	"testing first argument"
     unset env(TEST)