From patchwork Fri May 25 06:25:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yixin Zhang X-Patchwork-Id: 920258 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 40sbpy3L05z9s08 for ; Fri, 25 May 2018 16:25:44 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 3152C3E6B1A for ; Fri, 25 May 2018 08:25:41 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-4.smtp.seeweb.it (in-4.smtp.seeweb.it [217.194.8.4]) by picard.linux.it (Postfix) with ESMTP id 6F2833E6AF2 for ; Fri, 25 May 2018 08:25:38 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by in-4.smtp.seeweb.it (Postfix) with ESMTPS id 783741000CEC for ; Fri, 25 May 2018 08:25:35 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 May 2018 23:25:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,439,1520924400"; d="scan'208";a="52065019" Received: from yixin-desktop.sh.intel.com ([10.239.161.27]) by FMSMGA003.fm.intel.com with ESMTP; 24 May 2018 23:25:32 -0700 From: Yixin Zhang To: ltp@lists.linux.it Date: Fri, 25 May 2018 14:25:31 +0800 Message-Id: <20180525062531.30549-1-yixin.zhang@intel.com> X-Mailer: git-send-email 2.14.1 X-Virus-Scanned: clamav-milter 0.99.2 at in-4.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-4.smtp.seeweb.it Cc: Yixin Zhang Subject: [LTP] [PATCH ltp] runltp: fix shellcheck error for sending email 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" runltp:894:11: error: Couldn't parse this test expression. [SC1073] runltp:894:13: error: If grouping expressions inside [..], use \( ..\). [SC1026] runltp:894:15: error: Expected test to end here (don't wrap commands in []/[[]]). Fix any mentioned problems and try again. [SC1072] Also change '-o' to '&&' according to the comment and context. Signed-off-by: Yixin Zhang --- runltp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runltp b/runltp index 51357fadf..c6e5b03e8 100755 --- a/runltp +++ b/runltp @@ -891,7 +891,7 @@ main() fi if [ "$ALT_EMAIL_OUT" -eq 1 ] ; then ## User wants reports to be e-mailed - if [ [ ! "$HTMLFILE_NAME" ] -o [ ! "$OUTPUTFILE_NAME" ] -o [ ! "$LOGFILE_NAME" ] ] ; then + if [ -z "$HTMLFILE_NAME" ] && [ -z "$OUTPUTFILE_NAME" ] && [ -z "$LOGFILE_NAME" ]; then ##User does not have output/logs/html-output, nothing to be mailed in this situation echo "Nothing to be mailed here...." else