From patchwork Tue May 7 09:58:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 32577 Received: (qmail 26231 invoked by alias); 7 May 2019 09:58:08 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 26223 invoked by uid 89); 7 May 2019 09:58:08 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 07 May 2019 09:58:06 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 8791DAE4B; Tue, 7 May 2019 09:58:04 +0000 (UTC) Date: Tue, 7 May 2019 11:58:02 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [committed][gdb/testsuite] Fix ls_host return in index-cache.exp Message-ID: <20190507095802.GA1108@delia> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes Hi, When adding a debug print here in index-cache.exp: ... proc_with_prefix test_cache_disabled { cache_dir } { lassign [ls_host $cache_dir] ret files_before + puts "before: '$files_before'" + exit ... we have: ... files_before: '' ... When further adding: ... proc_with_prefix test_cache_disabled { cache_dir } { + exec touch $cache_dir/foo.1 $cache_dir/foo.2 $cache_dir/foo.3 ... we have: ... files_before: 'foo.1' ... while we're expecting file_before to contain foo.[123]. Fix this by making the return statement in ls_host return a list rather than a string (in accordance with the ls_host documentation), after which we have: ... files_before: 'foo.1 foo.2 foo.3' ... Tested on x86_64-linux. Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix ls_host return in index-cache.exp gdb/testsuite/ChangeLog: 2019-05-07 Tom de Vries * gdb.base/index-cache.exp (ls_host): Fix return statement. --- gdb/testsuite/gdb.base/index-cache.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.base/index-cache.exp b/gdb/testsuite/gdb.base/index-cache.exp index 5baba84360..b76a02b736 100644 --- a/gdb/testsuite/gdb.base/index-cache.exp +++ b/gdb/testsuite/gdb.base/index-cache.exp @@ -50,7 +50,7 @@ proc ls_host { dir } { } } - return "0 $filtered" + return [list 0 $filtered] } # Execute "show index-cache stats" and verify the output against expected