From patchwork Thu Oct 16 05:35:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 3239 Received: (qmail 15470 invoked by alias); 16 Oct 2014 05:39:38 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 15458 invoked by uid 89); 16 Oct 2014 05:39:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 16 Oct 2014 05:39:35 +0000 Received: from svr-orw-fem-06.mgc.mentorg.com ([147.34.97.120]) by relay1.mentorg.com with esmtp id 1Xedmd-0001ve-I0 from Yao_Qi@mentor.com ; Wed, 15 Oct 2014 22:39:31 -0700 Received: from GreenOnly (147.34.91.1) by SVR-ORW-FEM-06.mgc.mentorg.com (147.34.97.120) with Microsoft SMTP Server id 14.3.181.6; Wed, 15 Oct 2014 22:39:30 -0700 From: Yao Qi To: Pedro Alves CC: Subject: Re: [PATCH] Don't check target_info exists noargs in commands.exp References: <1413167285-14378-1-git-send-email-yao@codesourcery.com> <543E7F2F.5040404@redhat.com> Date: Thu, 16 Oct 2014 13:35:32 +0800 In-Reply-To: <543E7F2F.5040404@redhat.com> (Pedro Alves's message of "Wed, 15 Oct 2014 15:05:35 +0100") Message-ID: <87bnpcmva3.fsf@codesourcery.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 X-IsSubscribed: yes Pedro Alves writes: > Makes sense to me. Though it looks to me like to be > thorough we should remove all the "set args ..." lines too, like: > >> gdb_test_no_output "set args 5" "set args in progvar_simple_while_test" > ^^^^^^^^^^ >> if { ![runto factorial] } then { gdb_suppress_tests } >> # Don't depend upon argument passing, since most simulators don't > > and several more as visible in the patch. Right, the updated patch below removes "set args" line too. diff --git a/gdb/testsuite/gdb.base/commands.exp b/gdb/testsuite/gdb.base/commands.exp index ef86059..44c7be2 100644 --- a/gdb/testsuite/gdb.base/commands.exp +++ b/gdb/testsuite/gdb.base/commands.exp @@ -59,11 +59,6 @@ proc gdbvar_complex_if_while_test {} { proc progvar_simple_if_test {} { global gdb_prompt - if [target_info exists noargs] { - verbose "Skipping progvar_simple_if_test because of noargs." - return - } - if { ![runto factorial] } then { gdb_suppress_tests; } # Don't depend upon argument passing, since most simulators don't # currently support it. Bash value variable to be what we want. @@ -82,12 +77,6 @@ proc progvar_simple_if_test {} { proc progvar_simple_while_test {} { global gdb_prompt - if [target_info exists noargs] { - verbose "Skipping progvar_simple_while_test because of noargs." - return - } - - gdb_test_no_output "set args 5" "set args in progvar_simple_while_test" if { ![runto factorial] } then { gdb_suppress_tests } # Don't depend upon argument passing, since most simulators don't # currently support it. Bash value variable to be what we want. @@ -102,13 +91,6 @@ proc progvar_simple_while_test {} { proc progvar_complex_if_while_test {} { global gdb_prompt - if [target_info exists noargs] { - verbose "Skipping progvar_simple_if_while_test because of noargs." - return - } - - gdb_test_no_output "set args 4" \ - "set args in progvar_complex_if_while_test" if { ![runto factorial] } then { gdb_suppress_tests } # Don't depend upon argument passing, since most simulators don't # currently support it. Bash value variable to be what we want. @@ -121,13 +103,7 @@ proc progvar_complex_if_while_test {} { } proc if_while_breakpoint_command_test {} { - if [target_info exists noargs] { - verbose "Skipping if_while_breakpoint_command_test because of noargs." - return - } - gdb_test_no_output "set args 5" \ - "set args in if_while_breakpoint_command_test" if { ![runto factorial] } then { gdb_suppress_tests } # Don't depend upon argument passing, since most simulators don't # currently support it. Bash value variable to be what we want. @@ -162,13 +138,7 @@ proc if_while_breakpoint_command_test {} { # subsection "Breakpoint command lists". proc infrun_breakpoint_command_test {} { - if [target_info exists noargs] { - verbose "Skipping infrun_breakpoint_command_test because of noargs." - return - } - gdb_test_no_output "set args 6" \ - "set args in infrun_breakpoint_command_test" if { ![runto factorial] } then { gdb_suppress_tests } # Don't depend upon argument passing, since most simulators don't # currently support it. Bash value variable to be what we want. @@ -197,12 +167,7 @@ proc infrun_breakpoint_command_test {} { } proc breakpoint_command_test {} { - if [target_info exists noargs] { - verbose "Skipping breakpoint_command_test because of noargs." - return - } - gdb_test_no_output "set args 6" "set args in breakpoint_command_test" if { ![runto factorial] } then { gdb_suppress_tests; } # Don't depend upon argument passing, since most simulators don't # currently support it. Bash value variable to be what we want. @@ -268,20 +233,13 @@ proc user_defined_command_test {} { } proc watchpoint_command_test {} { - global noargs global gdb_prompt - if [target_info exists noargs] { - verbose "Skipping watchpoint_command_test because of noargs." - return - } - # Disable hardware watchpoints if necessary. if [target_info exists gdb,no_hardware_watchpoints] { gdb_test_no_output "set can-use-hw-watchpoints 0" "" } - gdb_test_no_output "set args 6" "set args in watchpoint_command_test" if { ![runto factorial] } then { return } delete_breakpoints @@ -348,11 +306,6 @@ proc watchpoint_command_test {} { proc test_command_prompt_position {} { global gdb_prompt - if [target_info exists noargs] { - verbose "Skipping test_command_prompt_position because of noargs." - return - } - if { ![runto factorial] } then { gdb_suppress_tests; } # Don't depend upon argument passing, since most simulators don't # currently support it. Bash value variable to be what we want. @@ -446,14 +399,7 @@ proc deprecated_command_test {} { proc bp_deleted_in_command_test {} { global gdb_prompt - - if [target_info exists noargs] { - verbose "Skipping bp_deleted_in_command_test because of noargs." - return - } - gdb_test_no_output "set args 1" \ - "set args in bp_deleted_in_command_test" delete_breakpoints # Create a breakpoint, and associate a command-list to it, with @@ -498,14 +444,7 @@ proc bp_deleted_in_command_test {} { proc temporary_breakpoint_commands {} { global gdb_prompt - - if [target_info exists noargs] { - verbose "Skipping temporary_breakpoint_commands because of noargs." - return - } - gdb_test_no_output "set args 1" \ - "set args in temporary_breakpoint_commands" delete_breakpoints # Create a temporary breakpoint, and associate a commands list to it.