From patchwork Mon Sep 15 09:11:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Weinberger X-Patchwork-Id: 389242 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B0354140096 for ; Mon, 15 Sep 2014 19:13:27 +1000 (EST) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XTSKB-00062v-6M; Mon, 15 Sep 2014 09:11:55 +0000 Received: from mail.sigma-star.at ([95.130.255.111]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XTSK8-0005zf-WC for linux-mtd@lists.infradead.org; Mon, 15 Sep 2014 09:11:54 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.sigma-star.at (Postfix) with ESMTP id 45CB516B42A7; Mon, 15 Sep 2014 11:11:27 +0200 (CEST) X-Virus-Scanned: amavisd-new at mail.sigma-star.at Received: from localhost.localdomain (chello213047235169.tirol.surfer.at [213.47.235.169]) by mail.sigma-star.at (Postfix) with ESMTPSA id D1D6716B42A0; Mon, 15 Sep 2014 11:11:25 +0200 (CEST) From: Richard Weinberger To: fstests@vger.kernel.org Subject: [PATCH] Add UBIFS support Date: Mon, 15 Sep 2014 11:11:20 +0200 Message-Id: <1410772280-9771-1-git-send-email-richard@nod.at> X-Mailer: git-send-email 1.8.4.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140915_021153_375574_296CDB0F X-CRM114-Status: UNSURE ( 8.86 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record Cc: Richard Weinberger , linux-mtd@lists.infradead.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org UBIFS needs some extra care, the device node is of type character and it has no fsck tool. Signed-off-by: Richard Weinberger --- README | 1 + check | 2 ++ common/config | 4 ++-- common/rc | 18 ++++++++++++++++++ 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/README b/README index 8a362bd..96adc44 100644 --- a/README +++ b/README @@ -100,6 +100,7 @@ Running tests: Running all the udf tests: ./check -udf -g udf - for running nfs tests: ./check -nfs [test(s)] - for running cifs/smb3 tests: ./check -cifs [test(s)] + - for running ubifs tests: ./check -ubifs [test(s)] - To randomize test order: ./check -r [test(s)] diff --git a/check b/check index 42a1ac2..57ec612 100755 --- a/check +++ b/check @@ -70,6 +70,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 @@ -208,6 +209,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 fc21b37..af082ea 100644 --- a/common/config +++ b/common/config @@ -430,7 +430,7 @@ 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" exit 1 @@ -453,7 +453,7 @@ 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" exit 1 diff --git a/common/rc b/common/rc index b8f711a..064b987 100644 --- a/common/rc +++ b/common/rc @@ -1034,6 +1034,12 @@ _require_scratch_nocheck() _notrun "this test requires a valid \$SCRATCH_MNT and unique $SCRATCH_DEV" fi ;; + ubifs) + if [ -z "$SCRATCH_DEV" -o ! -c "$SCRATCH_DEV" -o ! -d "$SCRATCH_MNT" ]; + then + _notrun "this test requires a valid \$SCRATCH_MNT and unique $SCRATCH_DEV" + fi + ;; *) if [ -z "$SCRATCH_DEV" -o "`_is_block_dev $SCRATCH_DEV`" = "" ] then @@ -1100,6 +1106,12 @@ _require_test() _notrun "this test requires a valid \$TEST_DIR and unique $TEST_DEV" fi ;; + ubifs) + if [ -z "$TEST_DEV" -o ! -c "$TEST_DEV" -o ! -d "$TEST_DIR" ]; + then + _notrun "this test requires a valid \$TEST_DIR and a valid $TEST_DEV" + fi + ;; *) if [ -z "$TEST_DEV" -o "`_is_block_dev $TEST_DEV`" = "" ] then @@ -1897,6 +1909,9 @@ _check_test_fs() tmpfs) # no way to check consistency for tmpfs ;; + ubifs) + # ubifs has no fsck :-( + ;; *) _check_generic_filesystem $TEST_DEV ;; @@ -1935,6 +1950,9 @@ _check_scratch_fs() tmpfs) # no way to check consistency for tmpfs ;; + ubifs) + # ubifs has no fsck :-( + ;; *) _check_generic_filesystem $device ;;