From patchwork Fri May 25 07:44:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yixin Zhang X-Patchwork-Id: 920268 X-Patchwork-Delegate: petr.vorel@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40sdZN1fG4z9s15 for ; Fri, 25 May 2018 17:45:00 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 786533E6B19 for ; Fri, 25 May 2018 09:44:57 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [217.194.8.7]) by picard.linux.it (Postfix) with ESMTP id 810113E6AF2 for ; Fri, 25 May 2018 09:44:55 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by in-7.smtp.seeweb.it (Postfix) with ESMTPS id EEBBA22274B for ; Fri, 25 May 2018 09:44:53 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 May 2018 00:44:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,439,1520924400"; d="scan'208";a="44645818" Received: from yixin-desktop.sh.intel.com ([10.239.161.27]) by orsmga006.jf.intel.com with ESMTP; 25 May 2018 00:44:48 -0700 From: Yixin Zhang To: ltp@lists.linux.it Date: Fri, 25 May 2018 15:44:47 +0800 Message-Id: <20180525074447.26298-1-yixin.zhang@intel.com> X-Mailer: git-send-email 2.14.1 X-Virus-Scanned: clamav-milter 0.99.2 at in-7.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=-0.0 required=7.0 tests=SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-7.smtp.seeweb.it Cc: Yixin Zhang Subject: [LTP] [PATCH ltp] kernel/fs/doio/rwtest: fix shellcheck error X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" testcases/kernel/fs/doio/rwtest:199:12: error: > is for string comparisons. Use -gt instead. [SC2071] testcases/kernel/fs/doio/rwtest:320:10: error: Globs are ignored in [[ ]] except right of =/!=. Use a loop. [SC2203] testcases/kernel/fs/doio/rwtest:347:7: error: Couldn't parse this test expression. [SC1073] testcases/kernel/fs/doio/rwtest:347:25: error: Expected test to end here (don't wrap commands in []/[[]]). Fix any mentioned problems and try again. [SC1072] Signed-off-by: Yixin Zhang --- testcases/kernel/fs/doio/rwtest | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testcases/kernel/fs/doio/rwtest b/testcases/kernel/fs/doio/rwtest index 90b1658f5..bd6bf9de2 100644 --- a/testcases/kernel/fs/doio/rwtest +++ b/testcases/kernel/fs/doio/rwtest @@ -196,7 +196,7 @@ do case $1 in -n | -Dn ) dOpts="$dOpts $1 $2" # force file locking with > 1 process - if [[ $2 > 1 ]] + if [[ $2 -gt 1 ]] then dOpts="$dOpts -k" fi @@ -317,7 +317,7 @@ do typeset -i n=0 while (( n < ${#szcache[*]} )) do - if [[ szcache[$n] = $dir ]]; then + if [[ ${szcache[n]} = $dir ]]; then break; fi n=n+1 @@ -344,7 +344,7 @@ do # check if blks is a number, else set a default value for blks default_sz=1000000 - if [ $blks -eq $blks 2> /dev/null ] + if [ $blks -eq $blks ] 2>/dev/null then case $(uname) in