public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Lancelot SIX <lsix@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] gdb/testsuite: Remove duplicates from gdb.base/set-cfd.exp
Date: Fri,  7 Jan 2022 22:46:07 +0000 (GMT)	[thread overview]
Message-ID: <20220107224607.0C3F33857C6E@sourceware.org> (raw)

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

commit d95edb60be9f66cb4797130c8902bf5814b19448
Author: Lancelot SIX <lsix@lancelotsix.com>
Date:   Sun Nov 21 00:55:01 2021 +0000

    gdb/testsuite: Remove duplicates from gdb.base/set-cfd.exp
    
    When running the testsuite, I have:
    
        Running .../gdb/testsuite/gdb.base/set-cwd.exp ...
        DUPLICATE: gdb.base/set-cwd.exp: test_cwd_reset: continue to breakpoint: break-here
    
    Fix by moving the tests after the 'runto_main' within the same
    with_test_prefix scope.
    
    While at it, I fix some indentation issues.
    
    Tested on x86_64-linux.

Diff:
---
 gdb/testsuite/gdb.base/set-cwd.exp | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/gdb/testsuite/gdb.base/set-cwd.exp b/gdb/testsuite/gdb.base/set-cwd.exp
index 5a4241fd107..172d603f734 100644
--- a/gdb/testsuite/gdb.base/set-cwd.exp
+++ b/gdb/testsuite/gdb.base/set-cwd.exp
@@ -43,15 +43,15 @@ proc_with_prefix test_tilde_expansion { } {
     set home ""
     set test "print home var"
     gdb_test_multiple "print home" $test {
-    	-re "\\\$$decimal = $hex \"\(.+\)\"\r\n$gdb_prompt $" {
-    	    set home $expect_out(1,string)
-    	    pass $test
-    	}
+	-re "\\\$$decimal = $hex \"\(.+\)\"\r\n$gdb_prompt $" {
+	    set home $expect_out(1,string)
+	    pass $test
+	}
     }
 
     if { $home == "" } {
-    	untested "could not retrieve home var"
-    	return
+	untested "could not retrieve home var"
+	return
     }
 
     set curdir ""
@@ -177,13 +177,13 @@ proc_with_prefix test_cwd_reset { } {
 	if { ![runto_main] } {
 	    return -1
 	}
-    }
 
-    gdb_breakpoint [gdb_get_line_number "break-here"]
-    gdb_continue_to_breakpoint "break-here" ".* break-here .*"
+	gdb_breakpoint [gdb_get_line_number "break-here"]
+	gdb_continue_to_breakpoint "break-here" ".* break-here .*"
 
-    gdb_test "print dir" "\\\$$decimal = \"$gdb_cwd\", .*" \
-	"inferior cwd got reset correctly"
+	gdb_test "print dir" "\\\$$decimal = \"$gdb_cwd\", .*" \
+	    "inferior cwd got reset correctly"
+    }
 }
 
 test_cd_into_dir


                 reply	other threads:[~2022-01-07 22:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220107224607.0C3F33857C6E@sourceware.org \
    --to=lsix@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).