From patchwork Fri Apr 20 03:18:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yixin Zhang X-Patchwork-Id: 901617 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=none (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 40S1S20cr9z9s1w for ; Fri, 20 Apr 2018 13:24:31 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 9617D3E74C2 for ; Fri, 20 Apr 2018 05:24:23 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-6.smtp.seeweb.it (in-6.smtp.seeweb.it [217.194.8.6]) by picard.linux.it (Postfix) with ESMTP id 327863E6C17 for ; Fri, 20 Apr 2018 05:24:20 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by in-6.smtp.seeweb.it (Postfix) with ESMTPS id B844D14004F8 for ; Fri, 20 Apr 2018 05:24:18 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Apr 2018 20:24:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,299,1520924400"; d="scan'208";a="48424281" Received: from yixin-desktop.sh.intel.com ([10.239.161.27]) by fmsmga001.fm.intel.com with ESMTP; 19 Apr 2018 20:24:14 -0700 From: Yixin Zhang To: ltp@lists.linux.it Date: Fri, 20 Apr 2018 11:18:51 +0800 Message-Id: <20180420031855.22657-2-yixin.zhang@intel.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180420031855.22657-1-yixin.zhang@intel.com> References: <20180420031855.22657-1-yixin.zhang@intel.com> X-Virus-Scanned: clamav-milter 0.99.2 at in-6.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-6.smtp.seeweb.it Cc: Yixin Zhang Subject: [LTP] [PATCH ltp 2/6] io/stress_floppy/stress_floppy: Fix shellcheck issue SC2069 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" error: The order of the 2>&1 and the redirect matters. The 2>&1 has to be last. [SC2069] Signed-off-by: Yixin Zhang --- testcases/kernel/io/stress_floppy/stress_floppy | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/testcases/kernel/io/stress_floppy/stress_floppy b/testcases/kernel/io/stress_floppy/stress_floppy index b269f5ffe..ff327dffb 100755 --- a/testcases/kernel/io/stress_floppy/stress_floppy +++ b/testcases/kernel/io/stress_floppy/stress_floppy @@ -96,7 +96,7 @@ test_tar() else tst_resm TINFO "$the_file Tar read passed." fi - diff $TCdat/dumpdir/$the_file $the_file 2>&1 >/dev/null + diff $TCdat/dumpdir/$the_file $the_file >/dev/null 2>&1 if [ $? -ne 0 ]; then tst_resm TFAIL "Diff of the $the_file tar files failed!" return @@ -140,7 +140,7 @@ test_dump() for the_file in 1K_file 10K_file 100K_file do - diff dumpdir/$the_file /$TCdat/dumpdir/$the_file 2>&1 >/dev/null + diff dumpdir/$the_file /$TCdat/dumpdir/$the_file >/dev/null 2>&1 if [ $? -ne 0 ]; then tst_resm TFAIL \ "Diff of the $the_file backup files failed!" @@ -180,7 +180,7 @@ test_cpio() else tst_resm TINFO "$the_file cpio read passed." fi - diff $TCdat/dumpdir/$the_file $the_file 2>&1 >/dev/null + diff $TCdat/dumpdir/$the_file $the_file >/dev/null 2>&1 if [ $? -ne 0 ]; then tst_resm TFAIL \ "Diff of the $the_file cpio files failed!" @@ -213,7 +213,7 @@ test_dd() else tst_resm TINFO "$the_file dd read passed." fi - diff $TCdat/$the_file $the_file 2>&1 >/dev/null + diff $TCdat/$the_file $the_file >/dev/null 2>&1 if [ $? -ne 0 ]; then tst_resm TFAIL "Diff of the $the_file dd files failed!" return