public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb.base/corefile-buildid.exp: fix DUPLICATEs when failing to generate a core file
@ 2021-12-01  2:05 Simon Marchi
  0 siblings, 0 replies; only message in thread
From: Simon Marchi @ 2021-12-01  2:05 UTC (permalink / raw)
  To: gdb-cvs

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

commit 6976b5b96120ad71af4cec2891f3d8ae7869e4e0
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date:   Tue Nov 30 21:00:59 2021 -0500

    gdb.base/corefile-buildid.exp: fix DUPLICATEs when failing to generate a core file
    
    When my system isn't properly configured to generate core files in the
    local directory, I see these DUPLICATEs:
    
        DUPLICATE: gdb.base/corefile-buildid.exp: could not generate core file
    
    Fix that by having a single with_test_prefix around that message and
    what follows.
    
    Change-Id: I4ac245fcce1c666db56e3bad3582aa17f183dcba

Diff:
---
 gdb/testsuite/gdb.base/corefile-buildid.exp | 38 ++++++++++++++---------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/gdb/testsuite/gdb.base/corefile-buildid.exp b/gdb/testsuite/gdb.base/corefile-buildid.exp
index 15509be7039..e1703d6a248 100644
--- a/gdb/testsuite/gdb.base/corefile-buildid.exp
+++ b/gdb/testsuite/gdb.base/corefile-buildid.exp
@@ -257,30 +257,30 @@ proc do_corefile_buildid_tests {args} {
 	lappend suffix "sepdebug"
     }
 
-    # Find the core file.
-    set corefile [core_find $program_to_run]
-    if {$corefile == ""} {
-	untested "could not generate core file"
-	return
-    }
-    verbose -log "corefile is $corefile"
+    with_test_prefix "[join $suffix \ ]" {
+	# Find the core file.
+	set corefile [core_find $program_to_run]
+	if {$corefile == ""} {
+	    untested "could not generate core file"
+	    return
+	}
+	verbose -log "corefile is $corefile"
 
-    # Grab the build-id from the binary, removing ".debug" from the end.
-    set buildid [build_id_debug_filename_get $program_to_run]
-    if {$buildid == ""} {
-	untested "binary for [join $suffix \ ] has no build-id"
-    }
-    regsub {\.debug$} $buildid {} buildid
-    verbose -log "build-id is $buildid"
+	# Grab the build-id from the binary, removing ".debug" from the end.
+	set buildid [build_id_debug_filename_get $program_to_run]
+	if {$buildid == ""} {
+	    untested "binary has no build-id"
+	}
+	regsub {\.debug$} $buildid {} buildid
+	verbose -log "build-id is $buildid"
 
-    with_test_prefix "[join $suffix \ ]"  {
 	locate_exec_from_core_build_id $corefile $buildid \
 	    [join $suffix -] $sepdebug false $shared
-    }
 
-    with_test_prefix "symlink [join $suffix \ ]" {
-	locate_exec_from_core_build_id $corefile $buildid \
-	    [join $suffix -] $sepdebug true $shared
+	with_test_prefix "symlink" {
+	    locate_exec_from_core_build_id $corefile $buildid \
+		[join $suffix -] $sepdebug true $shared
+	}
     }
 }


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

only message in thread, other threads:[~2021-12-01  2:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-01  2:05 [binutils-gdb] gdb.base/corefile-buildid.exp: fix DUPLICATEs when failing to generate a core file Simon Marchi

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).