From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5517 invoked by alias); 18 Oct 2013 20:49:44 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 5472 invoked by uid 89); 18 Oct 2013 20:49:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 18 Oct 2013 20:49:42 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9IKnfk6018398 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 18 Oct 2013 16:49:41 -0400 Received: from barimba.redhat.com (ovpn-113-54.phx2.redhat.com [10.3.113.54]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r9IKnbin002849; Fri, 18 Oct 2013 16:49:40 -0400 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH v2 06/17] fix up gdb.mi Date: Fri, 18 Oct 2013 20:49:00 -0000 Message-Id: <1382129374-18344-7-git-send-email-tromey@redhat.com> In-Reply-To: <1382129374-18344-1-git-send-email-tromey@redhat.com> References: <1382129374-18344-1-git-send-email-tromey@redhat.com> X-SW-Source: 2013-10/txt/msg00585.txt.bz2 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 | 26 +++++++++++++++++++------- gdb/testsuite/gdb.mi/mi-logging.exp | 2 +- 3 files changed, 23 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..dbf0d66 100644 --- a/gdb/testsuite/gdb.mi/mi-file-transfer.exp +++ b/gdb/testsuite/gdb.mi/mi-file-transfer.exp @@ -54,15 +54,27 @@ proc mi_gdbserver_run { } { } proc test_file_transfer { filename description } { - mi_gdb_test "-target-file-put \"$filename\" \"down-server\"" \ + # If we are running everything locally, then we want to be sure to + # put the files into the test's standard output location. On the + # other hand, if the host or target is remote, then we need to + # continue with the "old-style" directory-less approach. + 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 +82,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