From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/2] test_robind.sh: add xfs and btrfs support
Date: Thu, 5 Nov 2015 13:20:56 +0100 [thread overview]
Message-ID: <20151105122056.GA7226@rei> (raw)
In-Reply-To: <1446273800-2494-2-git-send-email-eguan@redhat.com>
Hi!
> Add btrfs support and fix opts for xfs, which needs "-f" too.
>
> Signed-off-by: Eryu Guan <eguan@redhat.com>
> ---
> testcases/kernel/fs/fs_readonly/test_robind.sh | 13 ++++++++++---
> 1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/testcases/kernel/fs/fs_readonly/test_robind.sh b/testcases/kernel/fs/fs_readonly/test_robind.sh
> index 5674ca4..371d5fa 100755
> --- a/testcases/kernel/fs/fs_readonly/test_robind.sh
> +++ b/testcases/kernel/fs/fs_readonly/test_robind.sh
> @@ -197,10 +197,17 @@ for fstype in $FSTYPES; do
> opts="-F"
> if [ "$fstype" = "reiserfs" ]; then
> opts="-f --journal-size 513 -q"
> - elif [ "$fstype" = "jfs" ]; then
> + elif [ "$fstype" = "jfs" -o "$fstype" = "xfs" ]; then
> opts="-f"
> - elif [ "$fstype" = "xfs" ]; then
> - opts=""
> + elif [ "$fstype" = "btrfs" ]; then
> + # check if mkfs.btrfs supports -f option
> + # detect "-f --force" or "-f|--force" because btrfs-progs
> + # changes usage text in commit 3f312d500b73
> + if mkfs.btrfs 2>&1 | grep -q '\-f[ |]'; then
> + opts="-f"
> + else
> + opts=""
> + fi
> fi
We have this special cases in tst_mkfs function in test.sh, you should
really use that instead of copying the code around.
Lookin at the code in test.sh we should add special case for jfs there
and call tst_mkfs here instead of mkfs.$fstype.
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2015-11-05 12:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-31 6:43 [LTP] [PATCH 1/2] test_robind.sh: set default FSTYPES to LTP_BIG_DEV_FS_TYPE Eryu Guan
2015-10-31 6:43 ` [LTP] [PATCH 2/2] test_robind.sh: add xfs and btrfs support Eryu Guan
2015-11-05 12:20 ` Cyril Hrubis [this message]
2015-11-05 12:55 ` Eryu Guan
2015-11-05 12:22 ` [LTP] [PATCH 1/2] test_robind.sh: set default FSTYPES to LTP_BIG_DEV_FS_TYPE Cyril Hrubis
2015-11-09 6:31 ` Lei Li
2015-11-09 6:55 ` Eryu Guan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151105122056.GA7226@rei \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.