From 8b949fb5817fb997423dc4ae6a31a7369d81f9e5 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Fri, 1 Aug 2003 13:25:26 -0400 Subject: [PATCH] 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. --- tests/ChangeLog | 10 ++++++++++ tests/f_dup_de/expect-nohtree.1 | 31 +++++++++++++++++++++++++++++++ tests/f_dup_de/expect-nohtree.2 | 7 +++++++ tests/f_dup_de/script | 10 ++++++++++ tests/f_h_reindex/script | 6 ++++++ tests/f_salvage_dir/image.gz | Bin 612 -> 616 bytes 6 files changed, 64 insertions(+) create mode 100644 tests/f_dup_de/expect-nohtree.1 create mode 100644 tests/f_dup_de/expect-nohtree.2 create mode 100644 tests/f_dup_de/script create mode 100644 tests/f_h_reindex/script 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 64f6c606ab1a583c815521aefa780303cf653828..b0adde76110ae8c0481e7dfbb1464ad8b0447592 100644 GIT binary patch delta 565 zcmV-50?Pg51n2~RABzYGeVQsi0t0DnVP|Ck?cBRhQ(+ti;IF3;iCmP6H_*tep&AEG zj0h|yE-aE5M-iQjB!Hudx;Z(Ln7HY`;0VUak;%!?6*Ytbr}~|qexxD}CYGl5d6KvN z=p}C``JJBA(uM$Zs_B@8nC_SxF%vPR#v6*qZPmF-2C?2F9Wl4>*Gszmaczznfde6 z;mR>xyYoL$TLYb;TCJW<>zyjlSq`P`0MKF5bANsupK_4Zhe48;t`jKmy^IUaK&Ccn?AzuNxAlb#SJ zVsA?7Z+tCgH0E?uw!cOHh1i?2U;kLlnI`nVdsduZjlC)1msgXUEA?NCy(z8epNhRH z2igCo-v2fBrnI8}d+beVMgLapO*zPZ000000BDAP{5|%*P|7O1>ny8OivQss35ThcXP~&ebT<^=d-u6qD$R%D`|md5`ksdl+Ft)3 z=6|poVg85e>wNx)Yx@i4AO06T_2>1Saw(W=aQqLGAp$s)Faiw>KzsTLurZF90FVIy DP_!-6 delta 544 zcmV+*0^j}U1mpyNABzYGvg?;U0t0DnVP|Ck?cBXj6JZ<&@aL`&iM%K;zJW$|Lp2VX z7*SYETv#MAjv_i4Nf38+b8=*I(|^GcjFTgilcOtY2m`v*=X!leMI1~lP3`BCe9N`H z%Quw#u6HeM2tc=*iCK*4jkyss6_YiuFj;1%arMW>>U0Qy6XDj^tiIlOaeZ#HeqY+I zKjvv;)4Xx}z~$$!wl2-xUSEAt{djZzdpmyD`GxH_pNHn=*C&_nEMI&7GWX}F%T;1} zcISVpz6^ASTCH|AE$`HT?s6#Y2Y@b_Y@{@9#dn=Vc|_V%w$_lD;4^FfDd zz(4kGHeOtR*l+)rhm%d~4aFRZIT|w@GZHfzGZu3!=6KABm|~k#f3^RM7kwd2#omgzVCHAI-UtUdat<--t_NKI>|9b3AImrIk zjs7pOH>Dl@-(qh{JNma`Z^}XT0{{R306;4g@39X&ge{KNmE iukpOTQ^|t42Iv2iAp$#-Faiq;bf%wDMy9#|kO2Uha3F&K -- 1.8.3.1