public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/testsuite] Fix DUPLICATEs in s390-multiarch.exp
@ 2022-11-30 18:29 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2022-11-30 18:29 UTC (permalink / raw)
  To: gdb-cvs

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

commit f5c697b137b1f9d301cf89877a90c846f5b32e99
Author: Tom de Vries <tdevries@suse.de>
Date:   Wed Nov 30 19:29:52 2022 +0100

    [gdb/testsuite] Fix DUPLICATEs in s390-multiarch.exp
    
    On s390x-linux, I run into:
    ...
    DUPLICATE: gdb.arch/s390-multiarch.exp: Linux v2
    DUPLICATE: gdb.arch/s390-multiarch.exp: Linux v2
    DUPLICATE: gdb.arch/s390-multiarch.exp: Linux v2
    ...
    
    Fix this by using with_test_prefix.
    
    Tested on s390x-linux.

Diff:
---
 gdb/testsuite/gdb.arch/s390-multiarch.exp | 50 +++++++++++++++++--------------
 1 file changed, 27 insertions(+), 23 deletions(-)

diff --git a/gdb/testsuite/gdb.arch/s390-multiarch.exp b/gdb/testsuite/gdb.arch/s390-multiarch.exp
index f0e85544bd5..71cb53a5db9 100644
--- a/gdb/testsuite/gdb.arch/s390-multiarch.exp
+++ b/gdb/testsuite/gdb.arch/s390-multiarch.exp
@@ -73,45 +73,49 @@ proc test_linux_v2 {} {
     return 0
 }
 
-proc test_register_valid {reg variant} {
+proc test_register_valid {reg} {
     gdb_test "info reg $reg" \
 	"$reg\[ \t\]+0x\[0-9a-z\]+\[ \t\]+.*" \
-	"'$reg' exists ($variant)"
+	"'$reg' exists"
 }
 
-proc test_register_invalid {reg variant} {
+proc test_register_invalid {reg} {
     gdb_test "info reg $reg" \
 	"Invalid register `$reg'.*" \
-	"'$reg' must not exist ($variant)"
+	"'$reg' must not exist"
 }
 
 proc test_all_core64 {core type} {
     set variant "64-bit $type"
-    gdb_core_cmd $core "core-file ($variant)"
-    if { ! [test_linux_v2] } {
-	return
+    with_test_prefix $variant {
+	gdb_core_cmd $core "core-file"
+	if { ! [test_linux_v2] } {
+	    return
+	}
+	test_register_valid "last_break"
+	gdb_core_cmd "${core}.2" "core-file #2"
+	test_register_invalid "system_call"
+	gdb_core_cmd "${core}.3" "core-file #3"
+	test_register_invalid "last_break"
     }
-    test_register_valid "last_break" $variant
-    gdb_core_cmd "${core}.2" "core-file #2 ($variant)"
-    test_register_invalid "system_call" $variant
-    gdb_core_cmd "${core}.3" "core-file #3 ($variant)"
-    test_register_invalid "last_break" $variant
 }
 
 proc test_all_core31 {core type} {
     set variant "31-bit $type"
-    gdb_core_cmd $core "core-file ($variant)"
-    if { ! [test_linux_v2] } {
-	return
+    with_test_prefix $variant {
+	gdb_core_cmd $core "core-file"
+	if { ! [test_linux_v2] } {
+	    return
+	}
+	test_register_valid "r0h"
+	test_register_valid "last_break"
+	gdb_core_cmd "${core}.1" "core-file #1 "
+	test_register_invalid "r0h"
+	gdb_core_cmd "${core}.2" "core-file #2"
+	test_register_invalid "system_call"
+	gdb_core_cmd "${core}.3" "core-file #3"
+	test_register_invalid "last_break"
     }
-    test_register_valid "r0h" $variant
-    test_register_valid "last_break" $variant
-    gdb_core_cmd "${core}.1" "core-file #1 ($variant)"
-    test_register_invalid "r0h" $variant
-    gdb_core_cmd "${core}.2" "core-file #2 ($variant)"
-    test_register_invalid "system_call" $variant
-    gdb_core_cmd "${core}.3" "core-file #3 ($variant)"
-    test_register_invalid "last_break" $variant
 }
 
 set binfile "${binprefix}-64"

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

only message in thread, other threads:[~2022-11-30 18:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-30 18:29 [binutils-gdb] [gdb/testsuite] Fix DUPLICATEs in s390-multiarch.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).