From patchwork Fri Mar 13 08:51:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhaolei X-Patchwork-Id: 6003201 Return-Path: X-Original-To: patchwork-fstests@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0883E9F2A9 for ; Fri, 13 Mar 2015 08:53:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 453EF202B4 for ; Fri, 13 Mar 2015 08:53:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3CB2020251 for ; Fri, 13 Mar 2015 08:53:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752518AbbCMIxa (ORCPT ); Fri, 13 Mar 2015 04:53:30 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:43205 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751547AbbCMIxN (ORCPT ); Fri, 13 Mar 2015 04:53:13 -0400 X-IronPort-AV: E=Sophos;i="5.04,848,1406563200"; d="scan'208";a="75552544" Received: from unknown (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 13 Mar 2015 16:49:01 +0800 Received: from G08CNEXCHPEKD03.g08.fujitsu.local (localhost.localdomain [127.0.0.1]) by edo.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id t2D8piAF009014 for ; Fri, 13 Mar 2015 16:51:44 +0800 Received: from localhost.localdomain (10.167.226.114) by G08CNEXCHPEKD03.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server id 14.3.181.6; Fri, 13 Mar 2015 16:52:46 +0800 From: Zhaolei To: CC: Zhao Lei Subject: [PATCH] fix "utility required warning" with empty utility name Date: Fri, 13 Mar 2015 16:51:28 +0800 Message-ID: X-Mailer: git-send-email 1.8.5.1 MIME-Version: 1.0 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Zhao Lei In generic/019, if we hadn't install fio, we will get following output: FSTYP -- btrfs PLATFORM -- Linux/x86_64 lenovo 4.0.0-rc3_HEAD_9eccca0843205f87c00404b663188b88eb248051_ MKFS_OPTIONS -- /dev/sda6 MOUNT_OPTIONS -- -o context=system_u:object_r:nfs_t:s0 /dev/sda6 /var/ltf/tester/scratch_mnt generic/019 [not run] utility required, skipped this test <- * Not run: generic/019 Passed all 0 tests Reason of blank utility name is: $1 and $2 are reversed in _require_command(), this patch fixed this error. Signed-off-by: Zhao Lei --- common/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/rc b/common/rc index 1ed9df5..febad8c 100644 --- a/common/rc +++ b/common/rc @@ -1276,7 +1276,7 @@ _require_realtime() # _require_command() { - [ -n "$1" ] && _cmd="$1" || _cmd="$2" + [ -n "$2" ] && _cmd="$2" || _cmd="$1" [ -n "$1" -a -x "$1" ] || _notrun "$_cmd utility required, skipped this test" }