From patchwork Fri Feb 6 06:37:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaegeuk Kim X-Patchwork-Id: 5788891 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 A5BEB9F336 for ; Fri, 6 Feb 2015 06:37:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BF806201B4 for ; Fri, 6 Feb 2015 06:37:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B8A0E201BB for ; Fri, 6 Feb 2015 06:37:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752370AbbBFGhr (ORCPT ); Fri, 6 Feb 2015 01:37:47 -0500 Received: from mail.kernel.org ([198.145.29.136]:52953 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751912AbbBFGhq (ORCPT ); Fri, 6 Feb 2015 01:37:46 -0500 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D402C2012E; Fri, 6 Feb 2015 06:37:45 +0000 (UTC) Received: from localhost (unknown [73.189.178.17]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 09F7E201BB; Fri, 6 Feb 2015 06:37:45 +0000 (UTC) From: Jaegeuk Kim To: Dave Chinner Cc: fstests@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Jaegeuk Kim Subject: [PATCH 7/9 v5] common/log: add _get_log_configs for testing options Date: Thu, 5 Feb 2015 22:37:11 -0800 Message-Id: <1423204633-66673-8-git-send-email-jaegeuk@kernel.org> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1423204633-66673-1-git-send-email-jaegeuk@kernel.org> References: <1423204633-66673-1-git-send-email-jaegeuk@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 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds _get_log_configs for xfs and f2fs to test several mount options for: xfs/086 * xfs/087 In xfs/087, one more test was added, so 10 tests will be done in total. Signed-off-by: Jaegeuk Kim --- common/log | 47 +++++++++++++++++++++++++++++++++++++++++++++++ tests/xfs/086 | 15 +-------------- tests/xfs/087 | 14 +------------- tests/xfs/087.out | 42 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 91 insertions(+), 27 deletions(-) diff --git a/common/log b/common/log index d8b18f8..5be5411 100644 --- a/common/log +++ b/common/log @@ -510,5 +510,52 @@ _require_logstate() esac } +_xfs_log_config() +{ + echo "# mkfs-opt mount-opt" + echo "# ------------------------------" + echo " version=2 logbsize=32k" + echo " version=2,su=4096 logbsize=32k" + echo " version=2,su=32768 logbsize=32k" + echo " version=2,su=32768 logbsize=64k" + echo " version=2 logbsize=64k" + echo " version=2,su=64k logbsize=64k" + echo " version=2 logbsize=128k" + echo " version=2,su=128k logbsize=128k" + echo " version=2 logbsize=256k" + echo " version=2,su=256k logbsize=256k" +} + +_f2fs_log_config() +{ + echo "# mkfs-opt mount-opt" + echo "# ------------------------------" + echo " test1 active_logs=6,background_gc=off" + echo " test2 active_logs=6,background_gc=off,inline_data" + echo " test3 active_logs=6,background_gc=off,inline_dentry" + echo " test4 active_logs=6,background_gc=off,inline_data,inline_dentry" + echo " test5 active_logs=6,background_gc=off,disable_roll_forward" + echo " test6 active_logs=6,background_gc=off,discard,inline_data,inline_dentry" + echo " test7 active_logs=6,background_gc=on" + echo " test8 active_logs=6,background_gc=on,inline_data" + echo " test9 active_logs=6,background_gc=on,inline_data,inline_dentry" + echo " test10 active_logs=6,background_gc=on,discard,inline_data,inline_dentry" +} + +_get_log_configs() +{ + case "$FSTYP" in + xfs) + _xfs_log_config + ;; + f2fs) + _f2fs_log_config + ;; + *) + _notrun "$FSTYP does not support log configs." + ;; + esac +} + # make sure this script returns success /bin/true diff --git a/tests/xfs/086 b/tests/xfs/086 index 1f81c1b..0cc5008 100755 --- a/tests/xfs/086 +++ b/tests/xfs/086 @@ -51,20 +51,7 @@ _require_v2log echo "*** init FS" umount $SCRATCH_DEV >/dev/null 2>&1 -cat >$tmp.seq.params < $tmp.seq.params # Do the work for various log params which # should not effect the data content of the log diff --git a/tests/xfs/087 b/tests/xfs/087 index 8986f67..8da0f9c 100755 --- a/tests/xfs/087 +++ b/tests/xfs/087 @@ -67,19 +67,7 @@ _require_xfs_quota echo "*** init FS" umount $SCRATCH_DEV >/dev/null 2>&1 -cat >$tmp.seq.params < $tmp.seq.params cat $tmp.seq.params \ | while read mkfs mnt restofline diff --git a/tests/xfs/087.out b/tests/xfs/087.out index 181774e..9f6f80a 100644 --- a/tests/xfs/087.out +++ b/tests/xfs/087.out @@ -378,3 +378,45 @@ clean log *** filesystem is checked ok *** + +*** mkfs *** + + +*** mount *** + + +*** calling fsstress -p 4 -z -f rmdir=10 -f link=10 -f creat=10 -f mkdir=10 -f rename=30 -f stat=30 -f unlink=30 -f truncate=20 -m8 -n 10000 *** + + +*** ls -RF SCRATCH_MNT *** + + +*** godown *** + + +*** unmount *** + + +*** logprint after going down... *** + +dirty log + +*** mount with replay *** + + +*** ls -RF SCRATCH_MNT *** + + +*** diff ls before and after *** + +Files TMP.ls1 and TMP.ls2 are identical + +*** unmount *** + + +*** logprint after mount and replay... *** + +clean log + +*** filesystem is checked ok *** +