From patchwork Tue Jan 15 10:33:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Malcomson X-Patchwork-Id: 31062 Received: (qmail 101630 invoked by alias); 15 Jan 2019 10:33:22 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 101621 invoked by uid 89); 15 Jan 2019 10:33:21 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=H*c:HHH X-HELO: EUR03-DB5-obe.outbound.protection.outlook.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LKbuKNte94PgIcxhk0Fd/9TENd6PIsJk7Do1AD9gj6o=; b=iQxdiyi+g/PkKeHZdi7mM2DzkBJLhabymv9Xd38B+XNZ9Di/1gzi/Xc4vYiaCOgdQC9g+yRi6r/3/4Jk9XjwP6gfbwA8C7QJ1DI5nMhAqFNgw3WQQIHHRzEfzcOxDEuo+SYPOl8wyXmSGHSIibZUOm1Vr1d7EneW8JSz1h6hiA8= From: Matthew Malcomson To: Florian Weimer CC: "libc-alpha@sourceware.org" , nd Subject: Re: [Patch] [Makefile] Exit if provided an incorrect argument Date: Tue, 15 Jan 2019 10:33:16 +0000 Message-ID: References: <875zuq6xv9.fsf@oldenburg2.str.redhat.com> In-Reply-To: <875zuq6xv9.fsf@oldenburg2.str.redhat.com> authentication-results: spf=none (sender IP is ) smtp.mailfrom=Matthew.Malcomson@arm.com; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) MIME-Version: 1.0 On 15/01/19 10:03, Florian Weimer wrote: > * Matthew Malcomson: > >> --- a/Makefile >> +++ b/Makefile >> @@ -148,6 +148,7 @@ while test $$# -gt 0 ; do >> ;; >> --*) >> usage >> + exit 1 >> ;; >> *) >> break > I think you should add the exit to the usage function. > > Thanks, > Florian Makes sense -- thanks! Fixed patch attached. ChangeLog: 2019-01-15 Matthew Malcomson * Makefile (testrun.sh): Exit if provided incorrect arg. --- Patch Inlined for ease of reply ---- diff --git a/Makefile b/Makefile index b4703e4..9d76d86 100644 --- a/Makefile +++ b/Makefile @@ -137,6 +137,7 @@ GCONV_PATH="$${builddir}/iconvdata" usage () { echo "usage: $$0 [--tool=strace] PROGRAM [ARGUMENTS...]" 2>&1 echo " $$0 --tool=valgrind PROGRAM [ARGUMENTS...]" 2>&1 + exit 1 } toolname=default