From patchwork Wed Jul 24 06:36:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 33784 Received: (qmail 95343 invoked by alias); 24 Jul 2019 06:36:58 -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 95310 invoked by uid 89); 24 Jul 2019 06:36:58 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy=H*Ad:U*palves X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 24 Jul 2019 06:36:56 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 2144AAD89; Wed, 24 Jul 2019 06:36:54 +0000 (UTC) Date: Wed, 24 Jul 2019 08:36:52 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Cc: Pedro Alves Subject: [committed] Update expected info threads error messages in gdb.multi/tids.exp Message-ID: <20190724063651.GA5947@delia> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes Hi, We currently have these FAILs: ... FAIL: gdb.multi/tids.exp: two inferiors: info threads -1 FAIL: gdb.multi/tids.exp: two inferiors: info threads -$one ... because we're expecting: ... Invalid thread ID: -1 ... but instead we have: ... Unrecognized option at: -1 ... This error message for info threads has changed since commit 54d6600669 'Make "info threads" use the gdb::option framework'. Update the test accordingly. Tested on x86_64-linux. Committed to trunk. Thanks, - Tom Update expected info threads error messages in gdb.multi/tids.exp gdb/testsuite/ChangeLog: 2019-07-24 Tom de Vries PR testsuite/24831 * gdb.multi/tids.exp: Update error messages for info threads. --- gdb/testsuite/gdb.multi/tids.exp | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/gdb/testsuite/gdb.multi/tids.exp b/gdb/testsuite/gdb.multi/tids.exp index 3b0e1c1860..477806bdad 100644 --- a/gdb/testsuite/gdb.multi/tids.exp +++ b/gdb/testsuite/gdb.multi/tids.exp @@ -84,14 +84,19 @@ proc thr_apply_info_thr {tid_list info_thr {thr_apply ""}} { thread_apply $tid_list $thr_apply } -# Issue both "info threads TID_LIST" and "thread apply TID_LIST" and -# expect both commands to error out with EXP_ERROR. -proc thr_apply_info_thr_error {tid_list exp_error} { +# Issue both "thread apply TID_LIST" and "info threads TID_LIST" and +# expect commands to error out with EXP_ERROR_APPLY and EXP_ERROR_INFO. +# If EXP_ERROR_INFO is missing, default to EXP_ERROR_APPLY. +proc thr_apply_info_thr_error {tid_list exp_error_apply {exp_error_info ""}} { + if { "$exp_error_info" == "" } { + set exp_error_info "$exp_error_apply" + } + gdb_test "info threads $tid_list" \ - $exp_error + $exp_error_info gdb_test "thread apply $tid_list" \ - $exp_error \ + $exp_error_apply \ "thread apply $tid_list" } @@ -351,8 +356,10 @@ with_test_prefix "two inferiors" { thr_apply_info_thr_error "${prefix}2-1" "inverted range" thr_apply_info_thr_error "${prefix}2-\$one" "inverted range" if {$prefix == ""} { - thr_apply_info_thr_error "${prefix}-1" "Invalid thread ID: -1" - thr_apply_info_thr_error "${prefix}-\$one" "Invalid thread ID: -\\\$one" + thr_apply_info_thr_error "${prefix}-1" "Invalid thread ID: -1" \ + "Unrecognized option at: -1" + thr_apply_info_thr_error "${prefix}-\$one" \ + "Invalid thread ID: -\\\$one" "Unrecognized option at: -\\\$one" } else { thr_apply_info_thr_error "${prefix}-1" "negative value" thr_apply_info_thr_error "${prefix}-\$one" "negative value"