public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Update expected info threads error messages in gdb.multi/tids.exp
@ 2019-07-24  6:36 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2019-07-24  6:36 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=024a5840006aba9ba698aa9d868a7394016dd4a0

commit 024a5840006aba9ba698aa9d868a7394016dd4a0
Author: Tom de Vries <tdevries@suse.de>
Date:   Wed Jul 24 08:36:17 2019 +0200

    Update expected info threads error messages in gdb.multi/tids.exp
    
    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.
    
    gdb/testsuite/ChangeLog:
    
    2019-07-24  Tom de Vries  <tdevries@suse.de>
    
    	PR testsuite/24831
    	* gdb.multi/tids.exp: Update error messages for info threads.

Diff:
---
 gdb/testsuite/ChangeLog          |  5 +++++
 gdb/testsuite/gdb.multi/tids.exp | 21 ++++++++++++++-------
 2 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 4199f5b..32f7ea1 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,10 @@
 2019-07-24  Tom de Vries  <tdevries@suse.de>
 
+	PR testsuite/24831
+	* gdb.multi/tids.exp: Update error messages for info threads.
+
+2019-07-24  Tom de Vries  <tdevries@suse.de>
+
 	* gdb.base/info-types.exp: Allow info types to print info for more than
 	one file.
 
diff --git a/gdb/testsuite/gdb.multi/tids.exp b/gdb/testsuite/gdb.multi/tids.exp
index 3b0e1c1..477806b 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"


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-07-24  6:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-24  6:36 [binutils-gdb] Update expected info threads error messages in gdb.multi/tids.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).