From: Theodore Ts'o Date: Fri, 1 Aug 2003 17:25:26 +0000 (-0400) Subject: Fix tests so that they work even with --disable-htree. X-Git-Tag: E2FSPROGS-1_35-WIP-0801~3 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=8b949fb5817fb997423dc4ae6a31a7369d81f9e5;p=tools%2Fe2fsprogs.git Fix tests so that they work even with --disable-htree. f_salveage_dir: Remove HTREE flag from the test image's superblock. (It is not needed). f_h_reindex: Skip this test of the htree is not enabled f_dup_de: If htree is not enabled, clear the htree flag, and use alternate expect scripts for the test. --- diff --git a/tests/ChangeLog b/tests/ChangeLog index 4c769d9..d20b018 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,13 @@ +2003-08-01 Theodore Ts'o + + * f_salveage_dir: Remove HTREE flag from the test image's + superblock. (It is not needed). + + * f_h_reindex: Skip this test of the htree is not enabled + + * f_dup_de: If htree is not enabled, clear the htree flag, and use + alternate expect scripts for the test. + 2003-07-25 Theodore Ts'o * Release of E2fsprogs 1.34 diff --git a/tests/f_dup_de/expect-nohtree.1 b/tests/f_dup_de/expect-nohtree.1 new file mode 100644 index 0000000..64415cc --- /dev/null +++ b/tests/f_dup_de/expect-nohtree.1 @@ -0,0 +1,31 @@ +Pass 1: Checking inodes, blocks, and sizes +Inode 12 has INDEX_FL flag set on filesystem without htree support. +Clear HTree index? yes + +Pass 2: Checking directory structure +Duplicate entry 'mailcap.dpkg-old' found. + Marking /etc (12) to be rebuilt. + +Pass 3: Checking directory connectivity +Pass 3A: Optimizing directories +Duplicate entry 'fstab' in /etc (12) found. Clear? yes + +Duplicate entry 'localtime' in /etc (12) found. Clear? yes + +Duplicate entry 'mailcap.dpkg-old' in /etc (12) found. Clear? yes + +Duplicate entry 'modules.conf.old' in /etc (12) found. Clear? yes + +Entry 'modules.conf.old' in /etc (12) has a non-unique filename. +Rename to modules.conf.o~0? yes + +Duplicate entry 'resolv.conf' in /etc (12) found. Clear? yes + +Duplicate entry 'usb.permissions' in /etc (12) found. Clear? yes + +Pass 4: Checking reference counts +Pass 5: Checking group summary information + +test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** +test_filesys: 18/2048 files (5.6% non-contiguous), 324/330 blocks +Exit status is 1 diff --git a/tests/f_dup_de/expect-nohtree.2 b/tests/f_dup_de/expect-nohtree.2 new file mode 100644 index 0000000..4d680af --- /dev/null +++ b/tests/f_dup_de/expect-nohtree.2 @@ -0,0 +1,7 @@ +Pass 1: Checking inodes, blocks, and sizes +Pass 2: Checking directory structure +Pass 3: Checking directory connectivity +Pass 4: Checking reference counts +Pass 5: Checking group summary information +test_filesys: 18/2048 files (5.6% non-contiguous), 324/330 blocks +Exit status is 0 diff --git a/tests/f_dup_de/script b/tests/f_dup_de/script new file mode 100644 index 0000000..c0dfac0 --- /dev/null +++ b/tests/f_dup_de/script @@ -0,0 +1,10 @@ +if test "$HTREE"x = x -o "$HTREE_CLR"x = yx; then + gunzip < $test_dir/image.gz > $TMPFILE + $DEBUGFS -w -R "feature ^dir_index" $TMPFILE >& /dev/null + gzip $TMPFILE + IMAGE="$TMPFILE".gz + EXP1=$test_dir/expect-nohtree.1 + EXP2=$test_dir/expect-nohtree.2 +fi +. $cmd_dir/run_e2fsck +rm "$TMPFILE".gz diff --git a/tests/f_h_reindex/script b/tests/f_h_reindex/script new file mode 100644 index 0000000..9353ec7 --- /dev/null +++ b/tests/f_h_reindex/script @@ -0,0 +1,6 @@ +if test "$HTREE"x = yx -a "$HTREE_CLR"x = x; then +. $cmd_dir/run_e2fsck +else + rm -f $test_name.ok $test_name.failed + echo "skipped" +fi diff --git a/tests/f_salvage_dir/image.gz b/tests/f_salvage_dir/image.gz index 64f6c60..b0adde7 100644 Binary files a/tests/f_salvage_dir/image.gz and b/tests/f_salvage_dir/image.gz differ