Message ID | 20191105003657.16540-6-ynezz@true.cz |
---|---|
State | Accepted |
Delegated to: | Petr Štetiar |
Headers | show
Return-Path: <openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=true.cz Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TavDi7g6"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 476W400g4Qz9sNT for <incoming@patchwork.ozlabs.org>; Tue, 5 Nov 2019 11:38:24 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=C/ImoHK9cF5ma4WZJVHuJ7PIM2FbgWAp8xJ8jhNaGN8=; b=TavDi7g6KzmNbJ uy6jYdVy911cmrpIjCs7b0zlGe9j0FNbd2wVsUPHOpB62bmMcrqZ8FQiXDvale2LfUISMIO+91EGB rVdplSCDsRkXm1Q89Q0HorZZggFGyghKN5CWJCul3d9BfQ6/03kT9Vvxl0uTAzQXttx5wRNxZM17F HtGGtaFpGQ2s4Vs2kSzfgsrUUKjDPi8lqzN0GeH8XRNnMAxl9mh3J4FC4/2Uz5RTraaTV5f38YWqa zUg6UnY7+vMxdiG5PuP1/j3WzBcitDKoJYs/krpDNjv1zp6yVEPQ86rZIPtMupHGN5djVUumeJ191 szX/32mJaI81CvQtsiMA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iRmrT-0000wz-CQ; Tue, 05 Nov 2019 00:38:19 +0000 Received: from smtp-out.xnet.cz ([178.217.244.18]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iRmqO-00086E-BU for openwrt-devel@lists.openwrt.org; Tue, 05 Nov 2019 00:37:14 +0000 Received: from meh.true.cz (meh.true.cz [108.61.167.218]) (Authenticated sender: petr@true.cz) by smtp-out.xnet.cz (Postfix) with ESMTPSA id 0D7134D81; Tue, 5 Nov 2019 01:37:09 +0100 (CET) Received: by meh.true.cz (OpenSMTPD) with ESMTP id 3a72d9a4; Tue, 5 Nov 2019 01:36:59 +0100 (CET) From: =?utf-8?q?Petr_=C5=A0tetiar?= <ynezz@true.cz> To: openwrt-devel@lists.openwrt.org Date: Tue, 5 Nov 2019 01:36:44 +0100 Message-Id: <20191105003657.16540-6-ynezz@true.cz> In-Reply-To: <20191105003657.16540-1-ynezz@true.cz> References: <20191105003657.16540-1-ynezz@true.cz> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191104_163712_582037_13BC7EFC X-CRM114-Status: UNSURE ( 6.87 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [178.217.244.18 listed in list.dnswl.org] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record Subject: [OpenWrt-Devel] [PATCH uci 05/18] tests: shunit2: fix issues reported by shellcheck X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <openwrt-devel.lists.openwrt.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/openwrt-devel>, <mailto:openwrt-devel-request@lists.openwrt.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/openwrt-devel/> List-Post: <mailto:openwrt-devel@lists.openwrt.org> List-Help: <mailto:openwrt-devel-request@lists.openwrt.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/openwrt-devel>, <mailto:openwrt-devel-request@lists.openwrt.org?subject=subscribe> Cc: =?utf-8?q?Petr_=C5=A0tetiar?= <ynezz@true.cz> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "openwrt-devel" <openwrt-devel-bounces@lists.openwrt.org> Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org |
Series |
fixes and improvements
|
expand
|
diff --git a/tests/shunit2/tests.sh b/tests/shunit2/tests.sh index a7c6d9004987..72c48749feb6 100755 --- a/tests/shunit2/tests.sh +++ b/tests/shunit2/tests.sh @@ -7,7 +7,7 @@ TMP_DIR=${TESTS_DIR}"/tmp" FULL_SUITE=${TESTS_DIR}"/full_suite.sh" UCI_BIN=${UCI_BIN:-"../uci"} -[ -x $UCI_BIN ] || { +[ -x "$UCI_BIN" ] || { echo "uci is not present." >&2 return 1 } @@ -60,9 +60,9 @@ assertFailWithNoReturn() { } EOF -for suite in $(ls ${SCRIPTS_DIR}/*) +for suite in "${SCRIPTS_DIR}"/* do - cat ${suite} >> ${FULL_SUITE} + cat "${suite}" >> ${FULL_SUITE} done echo ". ${DO_TEST}" >> ${FULL_SUITE}
In tests.sh line 10: [ -x $UCI_BIN ] || { ^------^ SC2086: Double quote to prevent globbing and word splitting. In tests.sh line 63: for suite in $(ls ${SCRIPTS_DIR}/*) ^--------------------^ SC2045: Iterating over ls output is fragile. Use globs. In tests.sh line 65: cat ${suite} >> ${FULL_SUITE} ^------^ SC2086: Double quote to prevent globbing and word splitting. Signed-off-by: Petr Štetiar <ynezz@true.cz> --- tests/shunit2/tests.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)