From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from barracuda.ebox.ca (barracuda.ebox.ca [96.127.255.19]) by sourceware.org (Postfix) with ESMTPS id 0DF6A3898513 for ; Wed, 10 Jun 2020 03:16:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0DF6A3898513 X-ASG-Debug-ID: 1591758974-0c856e29fd135670001-fS2M51 Received: from smtp.ebox.ca (smtp.ebox.ca [96.127.255.82]) by barracuda.ebox.ca with ESMTP id I1pAaYBCa5RzK3BX (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 09 Jun 2020 23:16:14 -0400 (EDT) X-Barracuda-Envelope-From: simon.marchi@polymtl.ca X-Barracuda-RBL-Trusted-Forwarder: 96.127.255.82 Received: from localhost.localdomain (173-246-6-90.qc.cable.ebox.net [173.246.6.90]) by smtp.ebox.ca (Postfix) with ESMTP id B4B62441B21; Tue, 9 Jun 2020 23:16:14 -0400 (EDT) From: Simon Marchi X-Barracuda-Effective-Source-IP: 173-246-6-90.qc.cable.ebox.net[173.246.6.90] X-Barracuda-Apparent-Source-IP: 173.246.6.90 X-Barracuda-RBL-IP: 173.246.6.90 To: gdb-patches@sourceware.org Subject: [pushed] gdb/testsuite: fix duplicate test names in gdb.base/index-cache.exp Date: Tue, 9 Jun 2020 23:16:13 -0400 X-ASG-Orig-Subj: [pushed] gdb/testsuite: fix duplicate test names in gdb.base/index-cache.exp Message-Id: <20200610031613.58870-1-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: smtp.ebox.ca[96.127.255.82] X-Barracuda-Start-Time: 1591758974 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://96.127.255.19:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 2827 X-Virus-Scanned: by bsmtpd at ebox.ca X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.50 X-Barracuda-Spam-Status: No, SCORE=0.50 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=8.0 tests=BSF_RULE_7582B X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.82445 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE_7582B Custom Rule 7582B X-Spam-Status: No, score=-15.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_QUARANTINE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2020 03:16:17 -0000 Fix: DUPLICATE: gdb.base/index-cache.exp: test_cache_disabled: no files were created DUPLICATE: gdb.base/index-cache.exp: test_cache_disabled: check index-cache stats We use `proc_with_prefix` for test_cache_disabled, but we call it twice. So we need an additional prefix to identify the specific call. This patch adds that. gdb/testsuite/ChangeLog: * gdb.base/index-cache.exp (test_cache_disabled): Add test_prefix parameter, update callers. Change-Id: Idf382fd380c77a654e8a7aa236af50b65c96b1d2 --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.base/index-cache.exp | 20 +++++++++++--------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 2a7779b44902..dd003656d14d 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-06-09 Simon Marchi + + * gdb.base/index-cache.exp (test_cache_disabled): Add test_prefix + parameter, update callers. + 2020-06-04 Simon Marchi * gdb.dwarf2/share-psymtabs-bt.exp: New file. diff --git a/gdb/testsuite/gdb.base/index-cache.exp b/gdb/testsuite/gdb.base/index-cache.exp index 742983b19d41..29803902f044 100644 --- a/gdb/testsuite/gdb.base/index-cache.exp +++ b/gdb/testsuite/gdb.base/index-cache.exp @@ -119,16 +119,18 @@ proc_with_prefix test_basic_stuff { } { # Test loading a binary with the cache disabled. No file should be created. -proc_with_prefix test_cache_disabled { cache_dir } { - lassign [ls_host $cache_dir] ret files_before +proc_with_prefix test_cache_disabled { cache_dir test_prefix } { + with_test_prefix $test_prefix { + lassign [ls_host $cache_dir] ret files_before - run_test_with_flags $cache_dir off { - lassign [ls_host $cache_dir] ret files_after + run_test_with_flags $cache_dir off { + lassign [ls_host $cache_dir] ret files_after - set nfiles_created [expr [llength $files_after] - [llength $files_before]] - gdb_assert "$nfiles_created == 0" "no files were created" + set nfiles_created [expr [llength $files_after] - [llength $files_before]] + gdb_assert "$nfiles_created == 0" "no files were created" - check_cache_stats 0 0 + check_cache_stats 0 0 + } } } @@ -217,10 +219,10 @@ if { $ret != 0 } { # The ouput of mktemp contains an end of line, remove it. set cache_dir [string trimright $cache_dir \r\n] -test_cache_disabled $cache_dir +test_cache_disabled $cache_dir "before populate" test_cache_enabled_miss $cache_dir test_cache_enabled_hit $cache_dir # Test again with the cache disabled, now that it is populated. -test_cache_disabled $cache_dir +test_cache_disabled $cache_dir "after populate" -- 2.27.0