public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb/testsuite: resolve some duplicate test names in gdb.base
@ 2022-04-03 15:53 Andrew Burgess
  0 siblings, 0 replies; only message in thread
From: Andrew Burgess @ 2022-04-03 15:53 UTC (permalink / raw)
  To: gdb-cvs

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

commit 5187219460cd1ba877c555a67adb283c7a2f0d25
Author: Andrew Burgess <aburgess@redhat.com>
Date:   Sun Apr 3 16:48:09 2022 +0100

    gdb/testsuite: resolve some duplicate test names in gdb.base
    
    This commit resolves all the duplicate test names that I see in the
    script:
    
      gdb.base/attach-pie-misread.exp
    
    The duplicate names all come from a second call to
    build_executable_own_libs, so in this commit I've places the second
    call inside a with_test_prefix block.
    
    While I was making this change I've also modified the value being
    passed as the testname for the second build_executable_own_libs call.
    Previously we used ${test}, however, I think this was likely a
    mistake, the 'test' variable is setup for the previous test.  I
    suspect that ${testfile} is a better choice - especially now we have a
    testname prefix.
    
    As the testname is only used (after various calls) from within
    build_executable_from_specs should the build fail, I don't think this
    change really makes much difference though.
    
    There should be no change in what is tested after this commit.

Diff:
---
 gdb/testsuite/gdb.base/attach-pie-misread.exp | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/gdb/testsuite/gdb.base/attach-pie-misread.exp b/gdb/testsuite/gdb.base/attach-pie-misread.exp
index 78370a81ea0..3bbbbf826a5 100644
--- a/gdb/testsuite/gdb.base/attach-pie-misread.exp
+++ b/gdb/testsuite/gdb.base/attach-pie-misread.exp
@@ -96,10 +96,12 @@ if {$result == 0} {
     fail $test
 }
 
-set prelink_args [build_executable_own_libs ${test}.exp $executable $srcfile \
-		      [list pie "additional_flags=-DGEN=\"$genfile\""]]
-if {$prelink_args == ""} {
-    return -1
+with_test_prefix "rebuild with DGEN defined" {
+    set prelink_args [build_executable_own_libs ${testfile}.exp $executable $srcfile \
+			  [list pie "additional_flags=-DGEN=\"$genfile\""]]
+    if {$prelink_args == ""} {
+	return -1
+    }
 }
 
 # x86_64 file has 25MB, no need to keep it.


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

only message in thread, other threads:[~2022-04-03 15:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-03 15:53 [binutils-gdb] gdb/testsuite: resolve some duplicate test names in gdb.base Andrew Burgess

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