From patchwork Thu Jul 30 06:06:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Dongsheng X-Patchwork-Id: 6898651 Return-Path: X-Original-To: patchwork-fstests@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 49732C05AC for ; Thu, 30 Jul 2015 06:12:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B0CFE20588 for ; Thu, 30 Jul 2015 06:12:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4660720584 for ; Thu, 30 Jul 2015 06:12:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751634AbbG3GMh (ORCPT ); Thu, 30 Jul 2015 02:12:37 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:39160 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751216AbbG3GMg (ORCPT ); Thu, 30 Jul 2015 02:12:36 -0400 X-IronPort-AV: E=Sophos;i="5.15,520,1432569600"; d="scan'208";a="99065302" Received: from unknown (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 30 Jul 2015 14:16:07 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (localhost.localdomain [127.0.0.1]) by edo.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id t6U6AgRW029585; Thu, 30 Jul 2015 14:10:42 +0800 Received: from yds-PC.g08.fujitsu.local (10.167.226.66) by G08CNEXCHPEKD02.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.181.6; Thu, 30 Jul 2015 14:12:33 +0800 From: Dongsheng Yang To: , , , CC: , Dongsheng Yang Subject: [PATCH 1/5] xfstest: add ubifs support Date: Thu, 30 Jul 2015 14:06:53 +0800 Message-ID: <1438236417-24612-2-git-send-email-yangds.fnst@cn.fujitsu.com> X-Mailer: git-send-email 1.8.4.2 In-Reply-To: <1438236417-24612-1-git-send-email-yangds.fnst@cn.fujitsu.com> References: <1438236417-24612-1-git-send-email-yangds.fnst@cn.fujitsu.com> MIME-Version: 1.0 X-Originating-IP: [10.167.226.66] Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Signed-off-by: Dongsheng Yang --- check | 2 ++ common/config | 9 +++++---- common/rc | 8 ++++++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/check b/check index a300130..20d45f8 100755 --- a/check +++ b/check @@ -69,6 +69,7 @@ check options -nfs test NFS -cifs test CIFS -tmpfs test TMPFS + -ubifs test ubifs -l line mode diff -udiff show unified diff (default) -n show me, do not run tests @@ -207,6 +208,7 @@ while [ $# -gt 0 ]; do -nfs) FSTYP=nfs ;; -cifs) FSTYP=cifs ;; -tmpfs) FSTYP=tmpfs ;; + -ubifs) FSTYP=ubifs ;; -g) group=$2 ; shift ; GROUP_LIST="$GROUP_LIST $group" diff --git a/common/config b/common/config index 8e21c28..2c809b6 100644 --- a/common/config +++ b/common/config @@ -220,6 +220,7 @@ case "$HOSTOS" in export MKFS_EXT4_PROG="`set_prog_path mkfs.ext4`" export MKFS_UDF_PROG="`set_prog_path mkudffs`" export MKFS_BTRFS_PROG="`set_btrfs_mkfs_prog_path_with_opts`" + export MKFS_UBIFS_PROG="`set_prog_path mkfs.ubifs`" export MKFS_F2FS_PROG="`set_prog_path mkfs.f2fs`" export DUMP_F2FS_PROG="`set_prog_path dump.f2fs`" export BTRFS_UTIL_PROG="`set_prog_path btrfs`" @@ -465,9 +466,9 @@ get_next_config() { exit 1 fi - echo $TEST_DEV | grep -qE ":|//" > /dev/null 2>&1 + echo $TEST_DEV | grep -qE ":|//|ubi" > /dev/null 2>&1 if [ ! -b "$TEST_DEV" -a "$?" != "0" ]; then - echo "common/config: Error: \$TEST_DEV ($TEST_DEV) is not a block device or a network filesystem" + echo "common/config: Error: \$TEST_DEV ($TEST_DEV) is not a block device or a network filesystem or ubi device" exit 1 fi @@ -488,9 +489,9 @@ get_next_config() { export SCRATCH_DEV_NOT_SET=true fi - echo $SCRATCH_DEV | grep -qE ":|//" > /dev/null 2>&1 + echo $SCRATCH_DEV | grep -qE ":|//|ubi" > /dev/null 2>&1 if [ ! -z "$SCRATCH_DEV" -a ! -b "$SCRATCH_DEV" -a "$?" != "0" ]; then - echo "common/config: Error: \$SCRATCH_DEV ($SCRATCH_DEV) is not a block device or a network filesystem" + echo "common/config: Error: \$SCRATCH_DEV ($SCRATCH_DEV) is not a block device or a network filesystem or ubi device" exit 1 fi diff --git a/common/rc b/common/rc index 610045e..b206827 100644 --- a/common/rc +++ b/common/rc @@ -1106,7 +1106,7 @@ _require_scratch_nocheck() _notrun "this test requires a valid \$SCRATCH_MNT" fi ;; - tmpfs) + tmpfs|ubifs) if [ -z "$SCRATCH_DEV" -o ! -d "$SCRATCH_MNT" ]; then _notrun "this test requires a valid \$SCRATCH_MNT and unique $SCRATCH_DEV" @@ -1180,7 +1180,7 @@ _require_test() _notrun "this test requires a valid \$TEST_DIR" fi ;; - tmpfs) + tmpfs|ubifs) if [ -z "$TEST_DEV" -o ! -d "$TEST_DIR" ]; then _notrun "this test requires a valid \$TEST_DIR and unique $TEST_DEV" @@ -2054,6 +2054,8 @@ _check_test_fs() tmpfs) # no way to check consistency for tmpfs ;; + ubifs) + ;; *) _check_generic_filesystem $TEST_DEV ;; @@ -2092,6 +2094,8 @@ _check_scratch_fs() tmpfs) # no way to check consistency for tmpfs ;; + ubifs) + ;; *) _check_generic_filesystem $device ;;