From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luc Van Oostenryck Subject: Re: [PATCH] test-suite: handle format with filename.c not existing Date: Wed, 24 Jan 2018 20:25:06 +0100 Message-ID: <20180124192504.qg2nbb44hqpdevd4@ltop.local> References: <5d19aa93-b421-eb1f-3a4c-92fc9476747a@infradead.org> <20180124082814.a36sur5e7cusrleb@ltop.local> <20180124191922.t54focjgwmls7uz7@ltop.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-wm0-f52.google.com ([74.125.82.52]:33147 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752450AbeAXTZJ (ORCPT ); Wed, 24 Jan 2018 14:25:09 -0500 Received: by mail-wm0-f52.google.com with SMTP id x4so27973213wmc.0 for ; Wed, 24 Jan 2018 11:25:09 -0800 (PST) Content-Disposition: inline In-Reply-To: <20180124191922.t54focjgwmls7uz7@ltop.local> Sender: linux-sparse-owner@vger.kernel.org List-Id: linux-sparse@vger.kernel.org To: Randy Dunlap Cc: Linux-Sparse , Christopher Li On Wed, Jan 24, 2018 at 08:19:23PM +0100, Luc Van Oostenryck wrote: > On Wed, Jan 24, 2018 at 09:48:07AM -0800, Randy Dunlap wrote: > > On 01/24/2018 12:28 AM, Luc Van Oostenryck wrote: > > > On Mon, Jan 22, 2018 at 11:05:09AM -0800, Randy Dunlap wrote: > > >> From: Randy Dunlap > > >> > > >> In error(), quiet is undefined when the command: > > >> $ ./test-suite format filename1.c foobar1 > > >> > > >> is used and filename1.c does not exist. This causes a shell script error: > > >> ./test-suite: line 147: [: : integer expression expected > > >> > > >> because $quiet is undefined in > > >> [ "$quiet" -ne 1 ] && echo "error: $1" > > >> so the error message is lost. > > >> > > >> Just initialize quiet before any command line parsing. > > >> > > >> Signed-off-by: Randy Dunlap > > > > > > cfr: https://marc.info/?l=linux-sparse&m=151273892009415 > > > > I don't think that will fix the original problem that I posted the > > patch for. > > Yes, you're right. > The original problem doesn't exist in my tree but for another reason. Nevertheless, the reason explained in my patch is still valid and $quiet also need to be reset early in do_test(). -- Luc