Add some simple tests to check that flex_bg and meta_bg filesystems can be converted between 32 and 64bit layouts. Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> --- tests/r_32to64bit/expect.gz | Bin tests/r_32to64bit/name | 1 + tests/r_32to64bit/script | 75 ++++++++++++++++++++++++++++++++++++++ tests/r_32to64bit_meta/expect.gz | Bin tests/r_32to64bit_meta/name | 1 + tests/r_32to64bit_meta/script | 75 ++++++++++++++++++++++++++++++++++++++ tests/r_64to32bit/expect.gz | Bin tests/r_64to32bit/name | 1 + tests/r_64to32bit/script | 75 ++++++++++++++++++++++++++++++++++++++ tests/r_64to32bit_meta/expect.gz | Bin tests/r_64to32bit_meta/name | 1 + tests/r_64to32bit_meta/script | 75 ++++++++++++++++++++++++++++++++++++++ 12 files changed, 304 insertions(+) create mode 100644 tests/r_32to64bit/expect.gz create mode 100644 tests/r_32to64bit/name create mode 100644 tests/r_32to64bit/script create mode 100644 tests/r_32to64bit_meta/expect.gz create mode 100644 tests/r_32to64bit_meta/name create mode 100644 tests/r_32to64bit_meta/script create mode 100644 tests/r_64to32bit/expect.gz create mode 100644 tests/r_64to32bit/name create mode 100644 tests/r_64to32bit/script create mode 100644 tests/r_64to32bit_meta/expect.gz create mode 100644 tests/r_64to32bit_meta/name create mode 100644 tests/r_64to32bit_meta/script diff --git a/tests/r_32to64bit/expect.gz b/tests/r_32to64bit/expect.gz new file mode 100644 index 0000000000000000000000000000000000000000..4ba35c8ffb7ca9ef3159f1c40dd507c5fdcff180 GIT binary patch literal 3144 zcmZ`*X*3j!8dm!7W$ELyg<=L-hK3p<Qwo!<Fxhv5NJhvyq#<RPu`{E{lI&a4Fv3_8 zAsR&X-C!(P$B=BdzI%V&bML?Byz6t`^PK0r;y4bL$5V=CCs|iB?s$vU@<zS=e1K(p zl;lLdN&2y5yCca-pSG9cdBkxNp+L@y$vgWxw90e!t+7C80cA1K1*kVm%?(Hb3_`>O zSMCXfc7|O+K3V%l?fp(cH2thwAKa(zRM(C`{ad<->*q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6JpsE7<Exm7o1mO}J+l&8Eg$(SMDy$I! zzg3|My~cM>IHSJg6aJObr>gvvJ%&eD8$~;3|8a8l0(KZ%C29!QwecbSM-)~13q38) zf>KtrVAoCT@YWYtYOl!5(;~c(l>2Sv0FUcUorM=gDIiunO^jgPN|>+E^RS7;yA%xw z`QW>pxB8$}fb9CVN6?xj?v>x??@G4J^Y=n#1(AvJ>J2#J=YzfP&r_w8mj9e<dj~v1 zT;uu{dcd^*^;eQx&j?}aHh_Uyrf+wY(&gPk8kQ&^g-ed<h$&4+c*4&8Q`T=vCjxQD z;|Db(O|gOLBg~0ALqTJu6*1+jm?f@CVag$f-ab4`{W)n_>aF>3hvVI(<{7Hn{nirW zBh8i-D$T3^NlqYx+Ou7BXx~1z6f`!1Y|=QA!CXe6pZK(_4D4^o_<USlEBsQJj+xlm z35Z&2>L+-sM75!b>c{;Q9j?d@59a6YutUw&am}y8577dd`)jWBM#rnWO;+^Av_g&D zfxg<~e2rb|Qg;}|e+|9Vedt5-n~Ki&J2nhjYxxyz@LvOG?i<pN`f8j08#d*1hcRCM z(|P<+WA|72p#-7(Fy9ZoH2!Nx+W&{gLw&VpvX{n({`cU2qQ}QWwa3P_X+(Xj6AR0~ E0Hg9z@c;k- literal 0 HcmV?d00001 diff --git a/tests/r_32to64bit/name b/tests/r_32to64bit/name new file mode 100644 index 0000000..fb45fab --- /dev/null +++ b/tests/r_32to64bit/name @@ -0,0 +1 @@ +convert flex_bg 32bit fs to 64bit fs diff --git a/tests/r_32to64bit/script b/tests/r_32to64bit/script new file mode 100644 index 0000000..73493a4 --- /dev/null +++ b/tests/r_32to64bit/script @@ -0,0 +1,75 @@ +if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then + +FSCK_OPT=-fn +OUT=$test_name.log +EXP=$test_dir/expect +CONF=$TMPFILE.conf + +gzip -d < $EXP.gz > $EXP + +cat > $CONF << ENDL +[fs_types] + ext4h = { + features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,resize_inode + blocksize = 1024 + inode_size = 256 + make_hugefiles = true + hugefiles_dir = / + hugefiles_slack = 0 + hugefiles_name = aaaaa + hugefiles_digits = 4 + hugefiles_size = 1M + zero_hugefiles = false + } +ENDL + +echo "resize2fs test" > $OUT + +MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4h $TMPFILE 524288 >> $OUT 2>&1 +rm -rf $CONF + +# dump and check +$DUMPE2FS $TMPFILE 2>&1 | egrep "(GDT|bitmap|descriptor|^Group|Inode table|features)" >> $OUT +$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1 +status=$? +echo Exit status is $status >> $OUT + +# resize it +echo "resize2fs test.img -b" >> $OUT +$RESIZE2FS $TMPFILE -b -f 2>&1 >> $OUT 2>&1 +status=$? +echo Exit status is $status >> $OUT + +# dump and check +$DUMPE2FS $TMPFILE 2>&1 | egrep "(GDT|bitmap|descriptor|^Group|Inode table|features)" >> $OUT +$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1 +status=$? +echo Exit status is $status >> $OUT + +rm $TMPFILE + +# +# Do the verification +# + +sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" -e 's/test_filesys:.*//g' -i $OUT + +cmp -s $OUT $EXP +status=$? + +if [ "$status" = 0 ] ; then + echo "$test_name: $test_description: ok" + touch $test_name.ok +else + echo "$test_name: $test_description: failed" + diff $DIFF_OPTS $EXP $OUT > $test_name.failed +fi + +rm $EXP + +unset IMAGE FSCK_OPT OUT EXP CONF + +else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then + echo "$test_name: $test_description: skipped" +fi + diff --git a/tests/r_32to64bit_meta/expect.gz b/tests/r_32to64bit_meta/expect.gz new file mode 100644 index 0000000000000000000000000000000000000000..d6985ecb82b5b7bd9f5046ba99a7e6cf2d60963a GIT binary patch literal 2956 zcmb7^S3Dbx8i%b?($=a~TkRRt-fgMbHb|`0s@Q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rOi`U#6n()F&e=LO@>C+-roRe#+<qSakWuq*$(2d0n1 z9%udXzCPun^x%Un?oCMoNDYnjf!ZVyk6j~qIH4>qFPGnS%G5?{aam5!q0_<WX5T-4 zlo5B2lYE~<hm9$@|KLjld()ETQTr{3P35|EVo>Tv30y;9I%vaCpxW)I|DkrxUj?c_ zvIt?)N-)4zmiz7DD8w}}zoqd#%|ooJElmlt1M$eYWHho)mk;AY&O|J%26~_CK(kK# zD~j-(yjILhkMVJH&kpd{OINHy)wiAeF;9Z|+&T@^nzlGE8jibHkG%LullA8TYMY3y zzCjRR$4hg-=*^Qp#DvFsAnd#aJys{E_8`hu(203=b+CA>b#3Otn;bDu5rn+zm|x6) z%S`LfJLgAo>7H%)e0o>UF&n#p9y_FHIe*{UW>_fS_Nr^SG|fF--0H>|SV!Q*mtQ47 z&g6vY>t0AI@Dt1sd&7Cn|Am)l`~*uSr8%<Ge5)*KL<cpha~^$>G$MWu-Re_PoU7i~ zRcIM7+aV91Hvb=Z1`Eq6(DrR6y(&|*hceFIR_*?oa~g@FKNIx&l6H%>D|30As=07% fIH;utsvtLEMx^{NUbfXhFWC+In1f{;sHpx8)}i25 literal 0 HcmV?d00001 diff --git a/tests/r_32to64bit_meta/name b/tests/r_32to64bit_meta/name new file mode 100644 index 0000000..d83492e --- /dev/null +++ b/tests/r_32to64bit_meta/name @@ -0,0 +1 @@ +convert meta_bg 32bit fs to 64bit fs diff --git a/tests/r_32to64bit_meta/script b/tests/r_32to64bit_meta/script new file mode 100644 index 0000000..5d02114 --- /dev/null +++ b/tests/r_32to64bit_meta/script @@ -0,0 +1,75 @@ +if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then + +FSCK_OPT=-fn +OUT=$test_name.log +EXP=$test_dir/expect +CONF=$TMPFILE.conf + +gzip -d < $EXP.gz > $EXP + +cat > $CONF << ENDL +[fs_types] + ext4h = { + features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,meta_bg,^resize_inode + blocksize = 1024 + inode_size = 256 + make_hugefiles = true + hugefiles_dir = / + hugefiles_slack = 0 + hugefiles_name = aaaaa + hugefiles_digits = 4 + hugefiles_size = 1M + zero_hugefiles = false + } +ENDL + +echo "resize2fs test" > $OUT + +MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4h $TMPFILE 524288 >> $OUT 2>&1 +rm -rf $CONF + +# dump and check +$DUMPE2FS $TMPFILE 2>&1 | egrep "(GDT|bitmap|descriptor|^Group|Inode table|features)" >> $OUT +$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1 +status=$? +echo Exit status is $status >> $OUT + +# resize it +echo "resize2fs test.img -b" >> $OUT +$RESIZE2FS $TMPFILE -b -f 2>&1 >> $OUT 2>&1 +status=$? +echo Exit status is $status >> $OUT + +# dump and check +$DUMPE2FS $TMPFILE 2>&1 | egrep "(GDT|bitmap|descriptor|^Group|Inode table|features)" >> $OUT +$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1 +status=$? +echo Exit status is $status >> $OUT + +rm $TMPFILE + +# +# Do the verification +# + +sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" -e 's/test_filesys:.*//g' -i $OUT + +cmp -s $OUT $EXP +status=$? + +if [ "$status" = 0 ] ; then + echo "$test_name: $test_description: ok" + touch $test_name.ok +else + echo "$test_name: $test_description: failed" + diff $DIFF_OPTS $EXP $OUT > $test_name.failed +fi + +rm $EXP + +unset IMAGE FSCK_OPT OUT EXP CONF + +else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then + echo "$test_name: $test_description: skipped" +fi + diff --git a/tests/r_64to32bit/expect.gz b/tests/r_64to32bit/expect.gz new file mode 100644 index 0000000000000000000000000000000000000000..375a749e42b2a49724e874761048ac4cb91e010b GIT binary patch literal 3179 zcmaKsS5Om*5{6Y!ibxYsFc^wTGg8DLMG#16M^KOwq(qAJ5W$1A0E!?;6CojBFdUjn zFG48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S#xZs8sm zQvW9JOiUO^Vo4T%Q>vQ(v2w9iUIFfSJbvXj<u%L|e5}6S%JYW1lLr~Xkz)JO;irvl zd?r{$LHmxB!ewQxq9EvE5Q#@Or?Nc!SxL8w7H4+nqw9*+9il1d=s}P_&Z;A6o4|j? z<m_9S(d(d67VHVb7W8j9kCAy3>fbM1;c_kg_~xyi9u$#dA}U2lni*vEp|toyBj10` zzZ4a$j=uWZlVU9kIY!bG@$a7y#M+FDXyO!{iA(QfhkwqHua{0m70}W^6fA-?>mCE? zUynxg3Rl=XQA^8CsuKG9zd#f#P_Ryer@1Jn@wN?8TVr*xf+3&uEK1fQrxFStVHpdT zM(R<^rS~k8p24gILYWR3Lz}z`#2<x<zvQV_>y=v7y5O=3z<sBXb`7&*Ufr1(x#OcR z=qnV<nX%-3Dw-A@jf_v_;_qs!+jQuZ@o~)GIb802dhmSyy^cM8zKt}NX$BgN@hfzC zhy?$c6pQcSqfgdG)PB6Y<R=)LS{gVCI()WHV(vI)x{ov*Jk?x`S=t<6EN>6{C-q)D z(r=lZbnsntD_Jcf^Rd(nqhLTFFP%A1KyKPm<eTsrZ(QDEtHvS2bN>>b;Axl+ulevv zJaG1i!!LV6TRnObM<(sbJZ)WCwwZiLr~CfdyYzDTXt?gEd12(ppSA`Jwa*UkENcQy z+@Ynh3P5m0#BNqDNGFdtx@P4|3jE9NaMqg?bDV*y84FcajEE+}{)&fPQ(_$mm`2#| zr>2zwktDS`kj{0)?s4}}T5}cSSmb}h3xjEVSstXCIuIOX{;!GvVs~<tuz!(AK*4Bh rSi*ijD8iEj|3BfeM|eaIXd(fz>-2v*n{x>J5o}?rH%;OmpE&U!+d_0F literal 0 HcmV?d00001 diff --git a/tests/r_64to32bit/name b/tests/r_64to32bit/name new file mode 100644 index 0000000..4c82371 --- /dev/null +++ b/tests/r_64to32bit/name @@ -0,0 +1 @@ +convert flex_bg 64bit fs to 32bit fs diff --git a/tests/r_64to32bit/script b/tests/r_64to32bit/script new file mode 100644 index 0000000..83a37bd --- /dev/null +++ b/tests/r_64to32bit/script @@ -0,0 +1,75 @@ +if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then + +FSCK_OPT=-fn +OUT=$test_name.log +EXP=$test_dir/expect +CONF=$TMPFILE.conf + +gzip -d < $EXP.gz > $EXP + +cat > $CONF << ENDL +[fs_types] + ext4h = { + features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,resize_inode,64bit + blocksize = 1024 + inode_size = 256 + make_hugefiles = true + hugefiles_dir = / + hugefiles_slack = 0 + hugefiles_name = aaaaa + hugefiles_digits = 4 + hugefiles_size = 1M + zero_hugefiles = false + } +ENDL + +echo "resize2fs test" > $OUT + +MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4h $TMPFILE 524288 >> $OUT 2>&1 +rm -rf $CONF + +# dump and check +$DUMPE2FS $TMPFILE 2>&1 | egrep "(GDT|bitmap|descriptor|^Group|Inode table|features)" >> $OUT +$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1 +status=$? +echo Exit status is $status >> $OUT + +# resize it +echo "resize2fs test.img -s" >> $OUT +$RESIZE2FS $TMPFILE -s -f 2>&1 >> $OUT 2>&1 +status=$? +echo Exit status is $status >> $OUT + +# dump and check +$DUMPE2FS $TMPFILE 2>&1 | egrep "(GDT|bitmap|descriptor|^Group|Inode table|features)" >> $OUT +$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1 +status=$? +echo Exit status is $status >> $OUT + +rm $TMPFILE + +# +# Do the verification +# + +sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" -e 's/test_filesys:.*//g' -i $OUT + +cmp -s $OUT $EXP +status=$? + +if [ "$status" = 0 ] ; then + echo "$test_name: $test_description: ok" + touch $test_name.ok +else + echo "$test_name: $test_description: failed" + diff $DIFF_OPTS $EXP $OUT > $test_name.failed +fi + +rm $EXP + +unset IMAGE FSCK_OPT OUT EXP CONF + +else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then + echo "$test_name: $test_description: skipped" +fi + diff --git a/tests/r_64to32bit_meta/expect.gz b/tests/r_64to32bit_meta/expect.gz new file mode 100644 index 0000000000000000000000000000000000000000..e39d01f1bc21038a73c3678f11dd66fba8c25aeb GIT binary patch literal 2924 zcmb7_XHXLg630UXl&VAt<q0B1ArvXns|ZL5U?2e!kP;vqO`0GbrAwER1h5gLmq0*> zp+uw_h>8?Jnh-@Pj}A&d-psq3ySY#I?LV`#v;W!s?e3-2Gl0k$Svc_2p9SWA;wC(a z#E(=_3Av_GWm;w*@pXNFY+`3!tl`CTr0`|Z)YwWBg|<9!6fR1lREZ`*bM?g(UTk#R z*hXvR^ZK<9E~xEvuKaME;X*Gb1#C{$&t$Y5wvi{aw>!&RmY;W9wyfW<<I-R*67Eha z>!dS8n)dBytCcO5cakQe#|{>@OLR+<<~n!g*SFozb%v_#G|$!P28T<lP&pw5(nTHN zF%o)4Wwr6!tjl?8Jxj?S#F-yG_o{){4I8_((C0r}s`VM%kI`yvPY&2;x;&GzwaKyf zT6;NS-7i`tMt$WI;L)zGfb;YV>Ltg_{XcWax8F0X$*yhGyx_swd@T+QZCf3RcI3nj zVIUPBv<;|jVQSkNom`t1783*0-8=L1YZP7C*%klD9#8K554LsV2O$fANs`3gu>7+V zvwH*6F&Bx=jL-|sEsX8EF%vP+p!DaC;p>x`6H8}*4VTVjzU@ewl3aPVm$@~&M$+a! z3<mOAPB5Zk%!P)m%BYUNS`P2NY`VU4<k=kavM6I>Nr+`~{{8|NdUEpO{cHSJVs*@u zxmBpT>rsgrx_l81)88waBc<iqpEj8U^V{wPiglgso!Z>_{m7RvmI3TsaKdzDDu?_I zVIQCR-5OQ&A&va|O8S;uci)DdVI<-0hGc@}B3e^OLPyyjW6kl0VI+?5&FWx#YG3zY zet$`q8uRODDl?{dJO{2*{PemNu;=P+XV!p+nupR-?L4LNwckJKb-!i52Y<@a-1v6; z363zX!hr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Ay!LI4pV0<Q{#uAgLELbJ+E->8C7$ba+T#l^-G z*(X})-it+|V+~9QK83YNkaXR{sC3>?C|?7E+2kz=6be5{-`L=aHE?&4^C-;gR=o^I zD&4vHnD?>?k{_s}senC+r*Ov_c&hUiAyE!9^)y;B1ut~fI2-$F)J?<T#M^=V4MI~Z zq7-RAex(oMqe7MLM48QzZeRxKCsCPeFalYA>LYz_4rGgnI3@g<;uEAIX@$#qk0H9e z%aB#oBBWV&!~P~Bi|(`|`%*k?7Pmjyd{X>f>lqX4F!)v_!qEuxpEp7t$0+J<aP6&0 zl{EJ#$s{41u4uYdPP2?3xUcG)g7_ucS{3>;gp`N|o|>srem=bT!SP3S30&itJeRo3 z4|jJ7A%AtYcTyU*CpV(K-}B^T|No|<?<;M3-d%hf1{3sqLSkHM>eL%4o6+7<%?zs8 z^bf97Z8zoZhWltj&6T~wTQql6$yiG?e<o2C9-*nM*lnbmbSQj0dFZMdUGRm;`~LFk zo-38QU<g6#n0p{oD^emtqbyijs-J~5>>e@h8YKVuTO)Z&<l8)cq=GuGJ(GHO?BKCZ zNl{PIGn~n#9kYgYe>q3$?Mz&mZ)n4A{q(7;lb50)TOiA%!^1-06yLSxqrikwZ`o~> zS=*=;@zwBu%a}Io-jW>dXb(d8O!)EYXP9ibW9qa2M^X(2H;>_WHf`-FtzZ!%OP@E> Y2I|58$YVa1zGLR)AG6a^_5i>?0Su9%RsaA1 literal 0 HcmV?d00001 diff --git a/tests/r_64to32bit_meta/name b/tests/r_64to32bit_meta/name new file mode 100644 index 0000000..e99ed8b --- /dev/null +++ b/tests/r_64to32bit_meta/name @@ -0,0 +1 @@ +convert meta_bg 64bit fs to 32bit fs diff --git a/tests/r_64to32bit_meta/script b/tests/r_64to32bit_meta/script new file mode 100644 index 0000000..e2190ce --- /dev/null +++ b/tests/r_64to32bit_meta/script @@ -0,0 +1,75 @@ +if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then + +FSCK_OPT=-fn +OUT=$test_name.log +EXP=$test_dir/expect +CONF=$TMPFILE.conf + +gzip -d < $EXP.gz > $EXP + +cat > $CONF << ENDL +[fs_types] + ext4h = { + features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,sparse_super,filetype,dir_index,ext_attr,meta_bg,^resize_inode,64bit + blocksize = 1024 + inode_size = 256 + make_hugefiles = true + hugefiles_dir = / + hugefiles_slack = 0 + hugefiles_name = aaaaa + hugefiles_digits = 4 + hugefiles_size = 1M + zero_hugefiles = false + } +ENDL + +echo "resize2fs test" > $OUT + +MKE2FS_CONFIG=$CONF $MKE2FS -F -T ext4h $TMPFILE 524288 >> $OUT 2>&1 +rm -rf $CONF + +# dump and check +$DUMPE2FS $TMPFILE 2>&1 | egrep "(GDT|bitmap|descriptor|^Group|Inode table|features)" >> $OUT +$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1 +status=$? +echo Exit status is $status >> $OUT + +# resize it +echo "resize2fs test.img -s" >> $OUT +$RESIZE2FS $TMPFILE -s -f 2>&1 >> $OUT 2>&1 +status=$? +echo Exit status is $status >> $OUT + +# dump and check +$DUMPE2FS $TMPFILE 2>&1 | egrep "(GDT|bitmap|descriptor|^Group|Inode table|features)" >> $OUT +$FSCK $FSCK_OPT -N test_filesys $TMPFILE >> $OUT 2>&1 +status=$? +echo Exit status is $status >> $OUT + +rm $TMPFILE + +# +# Do the verification +# + +sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" -e 's/test_filesys:.*//g' -i $OUT + +cmp -s $OUT $EXP +status=$? + +if [ "$status" = 0 ] ; then + echo "$test_name: $test_description: ok" + touch $test_name.ok +else + echo "$test_name: $test_description: failed" + diff $DIFF_OPTS $EXP $OUT > $test_name.failed +fi + +rm $EXP + +unset IMAGE FSCK_OPT OUT EXP CONF + +else #if test -x $RESIZE2FS_EXE -a -x $DEBUGFS_EXE; then + echo "$test_name: $test_description: skipped" +fi + -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html