From patchwork Mon Jan 22 19:05:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 10179091 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 384A4602B7 for ; Mon, 22 Jan 2018 19:05:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B9C120246 for ; Mon, 22 Jan 2018 19:05:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E160281D2; Mon, 22 Jan 2018 19:05:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 86B0B20246 for ; Mon, 22 Jan 2018 19:05:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751140AbeAVTFP (ORCPT ); Mon, 22 Jan 2018 14:05:15 -0500 Received: from merlin.infradead.org ([205.233.59.134]:38350 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751125AbeAVTFO (ORCPT ); Mon, 22 Jan 2018 14:05:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Date:Message-ID:Subject:From:To:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=L/LPffF541yMkyy4UkNtCn+F3qpjExnn5K0moLcYx8M=; b=kYGm0gQvMEtcPVaUPwvB9xgovJ 5AQwHSplGM3+OSp4dt3CAiXrCMPop4CrkwU3w0bAnLw4YWlYCSW4sOCgGzoec0jW1adH0S5wC13oz FmUrQqLTkzBBCMkvkg6w5Y9FDx5DbLuDHLkpQep41WDP3iwr7I69i4do3epWXjIU6gvZJCA4h9IJB 57UFlIY++7Sv0vQFaa2gvtkjagHl1ZHKNNzJavM6G+QjWgU5ActkWtZQ2k1y8SeUKwZqLeGhum/7m IRzaMh/+g6jDJpEDKa7LMg9PjDwqrZvjTfF1A9nPz6tWqob7HuDhA4R0bmh2aMeDMgWeT2sk6rWaO wiEeV+qA==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=dragon.site) by merlin.infradead.org with esmtpsa (Exim 4.89 #1 (Red Hat Linux)) id 1edhP7-0006AR-5B; Mon, 22 Jan 2018 19:05:13 +0000 To: Linux-Sparse , Christopher Li From: Randy Dunlap Subject: [PATCH] test-suite: handle format with filename.c not existing Message-ID: <5d19aa93-b421-eb1f-3a4c-92fc9476747a@infradead.org> Date: Mon, 22 Jan 2018 11:05:09 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 Content-Language: en-US Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- validation/test-suite | 2 ++ 1 file changed, 2 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- sprs.orig/validation/test-suite +++ sprs.next/validation/test-suite @@ -368,6 +368,8 @@ arg_file() return 0 } +quiet=0 + case "$1" in '') do_test_suite