Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@redhat.com>
Subject: [PATCH 06/13] fix up gdb.mi
Date: Fri, 23 Aug 2013 20:36:00 -0000	[thread overview]
Message-ID: <1377290210-483-7-git-send-email-tromey@redhat.com> (raw)
In-Reply-To: <1377290210-483-1-git-send-email-tromey@redhat.com>

This fixes gdb.mi to be parallel-safe.

	* gdb.mi/mi-cmd-param-changed.exp (test_command_param_changed):
	Use "dwarf2 always-disassemble" for the "maint set" test.
	* gdb.mi/mi-file-transfer.exp (test_file_transfer): Use
	standard_output_file.
	* gdb.mi/mi-logging.exp: Use standard_output_file.
---
 gdb/testsuite/gdb.mi/mi-cmd-param-changed.exp |  6 +++---
 gdb/testsuite/gdb.mi/mi-file-transfer.exp     | 22 +++++++++++++++-------
 gdb/testsuite/gdb.mi/mi-logging.exp           |  2 +-
 3 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/gdb/testsuite/gdb.mi/mi-cmd-param-changed.exp b/gdb/testsuite/gdb.mi/mi-cmd-param-changed.exp
index 1791c97..7ba8724 100644
--- a/gdb/testsuite/gdb.mi/mi-cmd-param-changed.exp
+++ b/gdb/testsuite/gdb.mi/mi-cmd-param-changed.exp
@@ -85,9 +85,9 @@ proc test_command_param_changed { } {
 
 	# No notification is emitted for 'maint set' commands.
 	foreach boolean_opt { "on" "off" } {
-	    mi_gdb_test "maint set profile ${boolean_opt}" \
-		"\\&\"maint set profile ${boolean_opt}\\\\n\"\r\n\\^done" \
-		"\"maint set profile ${boolean_opt}\""
+	    mi_gdb_test "maint set dwarf2 always-disassemble ${boolean_opt}" \
+		"\\&\"maint set dwarf2 always-disassemble ${boolean_opt}\\\\n\"\r\n\\^done" \
+		"\"maint dwarf2 always-disassemble ${boolean_opt}\""
 	}
 
 	# Full command parameters are included in the notification when a
diff --git a/gdb/testsuite/gdb.mi/mi-file-transfer.exp b/gdb/testsuite/gdb.mi/mi-file-transfer.exp
index 9229fde..edf1786 100644
--- a/gdb/testsuite/gdb.mi/mi-file-transfer.exp
+++ b/gdb/testsuite/gdb.mi/mi-file-transfer.exp
@@ -54,15 +54,23 @@ proc mi_gdbserver_run { } {
 }
 
 proc test_file_transfer { filename description } {
-    mi_gdb_test "-target-file-put \"$filename\" \"down-server\"" \
+    if {![is_remote host] && ![is_remote target]} {
+	set up_server [standard_output_file up-server]
+	set down_server [standard_output_file down-server]
+    } else {
+	set up_server up-server
+	set down_server down-server
+    }
+
+    mi_gdb_test "-target-file-put \"$filename\" \"${down_server}\"" \
 	"\\^done" "put $description"
-    mi_gdb_test "-target-file-get \"down-server\" \"up-server\"" \
+    mi_gdb_test "-target-file-get \"${down_server}\" \"${up_server}\"" \
 	"\\^done" "get $description"
 
     if { ![is_remote target] } {
 	# If we can check the target copy of the file, do that too.
 	# This should catch symmetric errors in upload and download.
-	set result [remote_exec host "cmp -s $filename down-server"]
+	set result [remote_exec host "cmp -s $filename ${down_server}"]
 	if { [lindex $result 0] == 0 } {
 	    pass "compare intermediate $description"
 	} else {
@@ -70,25 +78,25 @@ proc test_file_transfer { filename description } {
 	}
     }
 
-    set result [remote_exec host "cmp -s $filename up-server"]
+    set result [remote_exec host "cmp -s $filename ${up_server}"]
     if { [lindex $result 0] == 0 } {
 	pass "compare $description"
     } else {
 	fail "compare $description"
     }
 
-    mi_gdb_test "-target-file-delete \"down-server\"" \
+    mi_gdb_test "-target-file-delete \"${down_server}\"" \
 	"\\^done" "deleted $description"
 
     if { ![is_remote target] } {
-	if { ! [remote_file target exists down-server] } {
+	if { ! [remote_file target exists ${down_server}] } {
 	    pass "verified deleted $description"
 	} else {
 	    fail "verified deleted $description"
 	}
     }
 
-    catch { file delete up-server }
+    catch { file delete ${up_server} }
 }
 
 mi_gdbserver_run
diff --git a/gdb/testsuite/gdb.mi/mi-logging.exp b/gdb/testsuite/gdb.mi/mi-logging.exp
index 87f3e1b..b38c036 100644
--- a/gdb/testsuite/gdb.mi/mi-logging.exp
+++ b/gdb/testsuite/gdb.mi/mi-logging.exp
@@ -33,7 +33,7 @@ if {[mi_run_to_main] < 0} {
     return -1
 }
 
-set milogfile "milog.txt"
+set milogfile [standard_output_file "milog.txt"]
 
 mi_gdb_test "-gdb-set logging file $milogfile" ".*"
 
-- 
1.8.1.4


  reply	other threads:[~2013-08-23 20:36 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-23 20:36 [PATCH 00/13] test suite parallel safety Tom Tromey
2013-08-23 20:36 ` Tom Tromey [this message]
2013-08-25  1:50   ` [PATCH 06/13] fix up gdb.mi Yao Qi
2013-10-17 18:45     ` Tom Tromey
2013-08-23 20:36 ` [PATCH 04/13] fix up gdb.gdb Tom Tromey
2013-08-23 20:37 ` [PATCH 11/13] introduce relative_filename and use it Tom Tromey
2013-08-27 13:44   ` Pedro Alves
2013-10-17 18:59     ` Tom Tromey
2013-08-23 20:37 ` [PATCH 07/13] fix up gdb.trace Tom Tromey
2013-08-27 12:26   ` Pedro Alves
2013-10-17 18:56     ` Tom Tromey
2013-08-23 20:37 ` [PATCH 08/13] simple changes in gdb.base Tom Tromey
2013-08-27 13:31   ` Pedro Alves
2013-10-17 19:58     ` Tom Tromey
2013-08-23 20:37 ` [PATCH 10/13] update fileio test Tom Tromey
2013-08-23 20:37 ` [PATCH 03/13] fix weird.exp for parallel testing Tom Tromey
2013-08-23 20:37 ` [PATCH 12/13] fix up gdb.server Tom Tromey
2013-08-23 20:37 ` [PATCH 01/13] fix up log-file toggling Tom Tromey
2013-08-23 20:37 ` [PATCH 02/13] fix some simple thinkos in the test suite Tom Tromey
2013-08-23 20:37 ` [PATCH 05/13] fix up gdb.xml Tom Tromey
2013-08-27 12:12   ` Pedro Alves
2013-10-17 18:42     ` Tom Tromey
2013-10-18 15:20       ` Pedro Alves
2013-08-23 20:37 ` [PATCH 13/13] make gdb.asm parallel-safe Tom Tromey
2013-08-27 13:48   ` Pedro Alves
2013-08-27 14:06     ` Tom Tromey
2013-08-23 20:37 ` [PATCH 09/13] update checkpoint test Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1377290210-483-7-git-send-email-tromey@redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox