[Ocfs2-tools-devel] [PATCH 3/3] Ocfs2-tests: Add testcases for fsck-test to verify if new corruption for inline-data can be fixed.

Tao Ma tao.ma at oracle.com
Mon Sep 8 07:33:08 PDT 2008


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.
>
> Signed-off-by: Tristan Ye <tristan.ye at oracle.com>
> ---
>  programs/fsck-tests/fsck-test.sh                   |   27 ++++++++++++++++++-
>  .../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, 117 insertions(+), 2 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..7f97f62 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"
> +        case "$corrupt" in
> +                "44")   ;;
> +                "45")   FS_FEATURES="inline-data" ;;
> +                *)      ;;
> +        esac
>   
As for 44, you need to set FS_FEATURES="noinline-data" so that in future 
if we move "inline-data" to default mkfs feature-set you test won't fail.

Regards,
Tao



More information about the Ocfs2-tools-devel mailing list