From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116026 invoked by alias); 7 May 2019 13:15:52 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 116016 invoked by uid 89); 7 May 2019 13:15:52 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-14.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Spam-Relays-External:Sendmail, H*RU:Sendmail, UD:ca X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 07 May 2019 13:15:50 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id x47DFfwa009585 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 7 May 2019 09:15:46 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca x47DFfwa009585 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1557234948; bh=oS8zGk81ZUh30jYjRzLF3xQkRy8UUQInYHyp0nak0Ho=; h=Subject:To:References:From:Date:In-Reply-To:From; b=dtqdxpIoTMN/TVm8oKVuRlsGJX6pVpJAiKPNetAh1/Sib5sGYcD+/6yW4AQm+BsUT rVgZiNBQobnSk8nLv4vIewCLDahgF3+J6iPYK/ajRO1hFxPrAwzxb8n0jpwcXCi2ac Ukdbblomg1vGbjZzHAFYA3Tq8ZZsrnBSmpF6w71s= Received: from [132.207.241.227] (Sansfil-Securise-Etudiants-Lassonde-241-227.polymtl.ca [132.207.241.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id CC10C1E0A9; Tue, 7 May 2019 09:15:41 -0400 (EDT) Subject: Re: [committed][gdb/testsuite] Fix ls_host return in index-cache.exp To: Tom de Vries , gdb-patches@sourceware.org References: <20190507095802.GA1108@delia> From: Simon Marchi Message-ID: <7494e7b5-4d3c-41a1-ccad-6e549d545866@polymtl.ca> Date: Tue, 07 May 2019 13:15:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190507095802.GA1108@delia> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-05/txt/msg00186.txt.bz2 On 2019-05-07 5:58 a.m., Tom de Vries wrote: > 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 > Oh, thanks! Simon