* [pushed 0/2] [gdb/testsuite] Fix gdb.xml/*.exp for remote host
@ 2023-03-21 10:25 Tom de Vries
2023-03-21 10:25 ` [pushed 1/2] [gdb/testsuite] Fix gdb.xml/tdesc-reload.exp " Tom de Vries
2023-03-21 10:25 ` [pushed 2/2] [gdb/testsuite] Fix gdb.xml/tdesc-regs.exp " Tom de Vries
0 siblings, 2 replies; 3+ messages in thread
From: Tom de Vries @ 2023-03-21 10:25 UTC (permalink / raw)
To: gdb-patches
Fix two testcases in gdb.xml/*.exp for remote host.
Results:
...
$ ./test-all.sh
HOST/TARGET: local
# of expected passes 46
HOST: local, TARGET: native-gdbserver
# of expected passes 46
HOST: local, TARGET: native-extended-gdbserver
# of expected passes 46
HOST: local, TARGET: native-stdio-gdbserver
# of expected passes 46
HOST: local, TARGET: remote-gdbserver-on-localhost
# of expected passes 46
HOST: local, TARGET: remote-stdio-gdbserver
# of expected passes 46
HOST: local, TARGET: remote-stdio-gdbserver-remotedir
# of expected passes 46
HOST: local-remote-host-notty, TARGET: native-gdbserver
# of expected passes 45
HOST: local-remote-host-notty, TARGET: native-extended-gdbserver
# of expected passes 45
HOST: local-remote-host-notty, TARGET: remote-gdbserver-on-localhost
# of expected passes 45
HOST: local-remote-host-notty, TARGET: remote-stdio-gdbserver
# of expected passes 45
HOST: local-remote-host-notty, TARGET: remote-stdio-gdbserver-remotedir
# of expected passes 45
HOST: local-remote-host, TARGET: native-gdbserver
# of expected passes 45
HOST: local-remote-host, TARGET: native-extended-gdbserver
# of expected passes 45
HOST: local-remote-host, TARGET: remote-gdbserver-on-localhost
# of expected passes 45
HOST: local-remote-host, TARGET: remote-stdio-gdbserver
# of expected passes 45
HOST: local-remote-host, TARGET: remote-stdio-gdbserver-remotedir
# of expected passes 45
HOST/TARGET: local-remote-host-native
# of expected passes 45
...
Tested on x86_64-linux.
Tom de Vries (2):
[gdb/testsuite] Fix gdb.xml/tdesc-reload.exp for remote host
[gdb/testsuite] Fix gdb.xml/tdesc-regs.exp for remote host
gdb/testsuite/gdb.xml/tdesc-regs.exp | 6 ++----
gdb/testsuite/gdb.xml/tdesc-reload.exp | 6 +++---
gdb/testsuite/lib/gdb.exp | 10 ++++++++++
3 files changed, 15 insertions(+), 7 deletions(-)
base-commit: 7c872c903c772ca6b269e5dbe2880dd084240ae6
--
2.35.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* [pushed 1/2] [gdb/testsuite] Fix gdb.xml/tdesc-reload.exp for remote host
2023-03-21 10:25 [pushed 0/2] [gdb/testsuite] Fix gdb.xml/*.exp for remote host Tom de Vries
@ 2023-03-21 10:25 ` Tom de Vries
2023-03-21 10:25 ` [pushed 2/2] [gdb/testsuite] Fix gdb.xml/tdesc-regs.exp " Tom de Vries
1 sibling, 0 replies; 3+ messages in thread
From: Tom de Vries @ 2023-03-21 10:25 UTC (permalink / raw)
To: gdb-patches
Fix test-case gdb.xml/tdesc-reload.exp for remote host by using appropriate
filenames.
Tested on x86_64-linux.
---
gdb/testsuite/gdb.xml/tdesc-reload.exp | 6 +++---
gdb/testsuite/lib/gdb.exp | 10 ++++++++++
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/gdb/testsuite/gdb.xml/tdesc-reload.exp b/gdb/testsuite/gdb.xml/tdesc-reload.exp
index 21dede88faa..b8ece6fc19c 100644
--- a/gdb/testsuite/gdb.xml/tdesc-reload.exp
+++ b/gdb/testsuite/gdb.xml/tdesc-reload.exp
@@ -29,9 +29,9 @@ if {![runto_main]} {
}
# Three files we're going to write out to.
-set xml_file_1 [standard_output_file outfile1.xml]
-set xml_file_2 [standard_output_file outfile2.xml]
-set xml_file_3 [standard_output_file outfile3.xml]
+set xml_file_1 [host_standard_output_file outfile1.xml]
+set xml_file_2 [host_standard_output_file outfile2.xml]
+set xml_file_3 [host_standard_output_file outfile3.xml]
# Write the current target description to a file.
gdb_test_no_output "pipe maint print xml-tdesc | cat > $xml_file_1" \
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 111a158e7ce..0a0ae697d1e 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -6364,6 +6364,16 @@ proc standard_output_file {basename} {
return [file join $dir $basename]
}
+# Turn BASENAME into a file name on host.
+
+proc host_standard_output_file { basename } {
+ if { [is_remote host] } {
+ return $basename
+ } else {
+ return [standard_output_file $basename]
+ }
+}
+
# Turn BASENAME into a full file name in the standard output directory. If
# GDB has been launched more than once then append the count, starting with
# a ".1" postfix.
--
2.35.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* [pushed 2/2] [gdb/testsuite] Fix gdb.xml/tdesc-regs.exp for remote host
2023-03-21 10:25 [pushed 0/2] [gdb/testsuite] Fix gdb.xml/*.exp for remote host Tom de Vries
2023-03-21 10:25 ` [pushed 1/2] [gdb/testsuite] Fix gdb.xml/tdesc-reload.exp " Tom de Vries
@ 2023-03-21 10:25 ` Tom de Vries
1 sibling, 0 replies; 3+ messages in thread
From: Tom de Vries @ 2023-03-21 10:25 UTC (permalink / raw)
To: gdb-patches
Fix test-case gdb.xml/tdesc-regs.exp for remote host by using appropriate
filenames.
Tested on x86_64-linux.
---
gdb/testsuite/gdb.xml/tdesc-regs.exp | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/gdb/testsuite/gdb.xml/tdesc-regs.exp b/gdb/testsuite/gdb.xml/tdesc-regs.exp
index 4545cd1c9b5..684c47f0b35 100644
--- a/gdb/testsuite/gdb.xml/tdesc-regs.exp
+++ b/gdb/testsuite/gdb.xml/tdesc-regs.exp
@@ -142,12 +142,10 @@ proc load_description { file errmsg xml_file } {
close $ifd
close $ofd
- if {[is_remote host]} {
- set regs_file [remote_download host "$regs_file" $xml_file]
- }
+ set host_regs_file [gdb_remote_download host "$regs_file"]
# Anchor the test output, so that error messages are detected.
- set cmd "set tdesc filename [file tail $regs_file]"
+ set cmd "set tdesc filename $host_regs_file"
set msg "set tdesc filename $xml_file - from $file"
set cmd_regex [string_to_regexp $cmd]
gdb_test_multiple $cmd $msg {
--
2.35.3
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-21 10:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-21 10:25 [pushed 0/2] [gdb/testsuite] Fix gdb.xml/*.exp for remote host Tom de Vries
2023-03-21 10:25 ` [pushed 1/2] [gdb/testsuite] Fix gdb.xml/tdesc-reload.exp " Tom de Vries
2023-03-21 10:25 ` [pushed 2/2] [gdb/testsuite] Fix gdb.xml/tdesc-regs.exp " Tom de Vries
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).