[Ocfs2-tools-devel] [PATCH 3/3] Ocfs2-tests: Add testcases for fsck-test to verify if new corruptions for inline-data can be fixed.v2
Tao Ma
tao.ma at oracle.com
Tue Sep 9 00:40:05 PDT 2008
Hi tristan,
Thanks for the patch.
Have you run it.
You can verify it by:
fsck-test.sh --with-fswreck=/path/to/fswreck --with-corrupt="44 45"
--disk-size=small /dev/sdX
fsck-test.sh --with-fswreck=/path/to/fswreck --with-corrupt="44 45"
--disk-size=medium /dev/sdX
at least it doesn't work here. Please see the following comments.
Tristan Ye wrote:
> Add new testcase for fsck-test to verfiy if newly added corruptions for inline-data
> can be fixed by fsck.the corruptions will mess up the inline-data flag and id_count.
>
> Btw,the newly added corruptions mentioned above in fswreck were 44,45(corrupt code).
> Therefore 4 .stdout files added for comparison when fscking...
>
> Should apply the patch for fswreck to add new corruptions first before your testing,
> this patch also has been sent out.
>
>>From v1 to v2:add noinline-data flag for 44(corruption code) test instead of using
> default option.
>
> Signed-off-by: Tristan Ye <tristan.ye at oracle.com>
> ---
> programs/fsck-tests/fsck-test.sh | 29 +++++++++++++++++--
> .../fsck-tests/medium-disk/fsck.ocfs2.44.stdout | 21 ++++++++++++++
> .../fsck-tests/medium-disk/fsck.ocfs2.45.stdout | 25 +++++++++++++++++
> .../fsck-tests/small-disk/fsck.ocfs2.44.stdout | 21 ++++++++++++++
> .../fsck-tests/small-disk/fsck.ocfs2.45.stdout | 25 +++++++++++++++++
> 5 files changed, 118 insertions(+), 3 deletions(-)
> create mode 100644 programs/fsck-tests/medium-disk/fsck.ocfs2.44.stdout
> create mode 100644 programs/fsck-tests/medium-disk/fsck.ocfs2.45.stdout
> create mode 100644 programs/fsck-tests/small-disk/fsck.ocfs2.44.stdout
> create mode 100644 programs/fsck-tests/small-disk/fsck.ocfs2.45.stdout
>
> diff --git a/programs/fsck-tests/fsck-test.sh b/programs/fsck-tests/fsck-test.sh
> index 7af55df..271b897 100755
> --- a/programs/fsck-tests/fsck-test.sh
> +++ b/programs/fsck-tests/fsck-test.sh
> @@ -195,6 +195,10 @@ DISK_SIZE="small"
> LOG_DIR=`dirname ${BINDIR}`
>
>
> +declare -a FS_FEATURES=""
> +FS_FEATURES_OPTION="--fs-features="
> +FS_FEATURES_ARGS=""
> +
> #
> # ext_setup Guess the position of fsck.ocfs2, fswreck and fill
> # FSCK_BIN, FSWRECK_BIN
> @@ -350,6 +354,22 @@ function smoke_test()
> test_pass_or_fail 0
> }
>
> +#add --fs-feature support for mkfs
> +function gen_fs_features()
> +{
> + local corrupt="$1"
you need to empty FS_FEATURES here. I run it with "44 45" together, and
get FS_FEATURE_ARGS=" --fs-features=inline-data --fs-features=noinline-data"
Regards,
Tao
More information about the Ocfs2-tools-devel
mailing list