Regression test for geom_uzip.

This commit is contained in:
Max Khon 2004-08-13 09:53:52 +00:00
parent 75261008d7
commit ee91bec14f
7 changed files with 198 additions and 0 deletions

View File

@ -0,0 +1,2 @@
test-1.img
test-1.img.gz

View File

@ -0,0 +1,21 @@
#
# $FreeBSD$
#
# Regression test for geom_ugz.
#
IMAGE= test-1.img
ZIMAGE= ${IMAGE}.gz
UZIMAGE= ${ZIMAGE}.uue
test:
@sh runtests.sh
image:
makefs -s 1048576 ${IMAGE} etalon
printf "#\n# $$" >${UZIMAGE}
printf "FreeBSD$$\n#\n\n" >> ${UZIMAGE}
create_compressed_fs ${IMAGE} 65536 | uuencode ${ZIMAGE} >>${UZIMAGE}
clean:
rm -f ${IMAGE} ${ZIMAGE}

View File

@ -0,0 +1,43 @@
#
# $FreeBSD$
#
JABBERWOCKY
Lewis Carroll
(from Through the Looking-Glass and What Alice Found There, 1872)
`Twas brillig, and the slithy toves
Did gyre and gimble in the wabe:
All mimsy were the borogoves,
And the mome raths outgrabe.
"Beware the Jabberwock, my son!
The jaws that bite, the claws that catch!
Beware the Jubjub bird, and shun
The frumious Bandersnatch!"
He took his vorpal sword in hand:
Long time the manxome foe he sought --
So rested he by the Tumtum tree,
And stood awhile in thought.
And, as in uffish thought he stood,
The Jabberwock, with eyes of flame,
Came whiffling through the tulgey wood,
And burbled as it came!
One, two! One, two! And through and through
The vorpal blade went snicker-snack!
He left it dead, and with its head
He went galumphing back.
"And, has thou slain the Jabberwock?
Come to my arms, my beamish boy!
O frabjous day! Callooh! Callay!'
He chortled in his joy.
`Twas brillig, and the slithy toves
Did gyre and gimble in the wabe;
All mimsy were the borogoves,
And the mome raths outgrabe.

View File

@ -0,0 +1,10 @@
#!/bin/sh
#
# $FreeBSD$
#
dir=`dirname $0`
for ts in `dirname $0`/test-*.sh; do
sh $ts
done

View File

@ -0,0 +1,72 @@
#
# $FreeBSD$
#
begin 664 test-1.img.gz
M(R$O8FEN+W-H"B-6,BXP($9O<FUA=`II;G-M;V0@8VQO;W`N;R!F:6QE/20P
M("8F(&UO=6YT("UR("UT(&ES;SDV-C`@+V1E=B]C;&]O<"`D,0IE>&ET("0_
M"@```````````````````````````````````````````````````0``````
M$0````````$8````````!A8````````&:@````````:^````````!Q(`````
M```'9@````````>Z````````"`X````````(8@````````BV````````"0H`
M```````)7@````````FR````````"@8````````*6@````````JN````````
M"PD````````+77C:[=U-;]Q$&,!Q;Q+H8H'4`X<B@9AM*FA1D@6$1!60R$M;
M4*D4J0T43F#OSJZ=V)[(8W>[O5`N7%#%&?$%."!."''@P('OP(4#1SX$:'G&
MZ^VF44NIPE((_Y\TZ[=Y\S.VY5W'BN<!`````````````("CXKBD$Y*4I-/U
MNI'XXK.GU[T%S_MIWO,:7IU!EILR>:3.][K[^&4T\GX;C9Z06=\;;W<?4FQ<
MKKFO,9E?D\G<ON5&/>O:ZY__=+?JPT*=)N7K?"ZMU=M='3<DG9W4U?!N,IIX
M*+YK-KWOF],C7?V+^E;W97+.W:BG9Q^PFNIZX$W/2W==\/9=,V9JK3[O_V'-
M^AKG8C?ZJ-%H2B=&S];7R/EIOLFU:6+[J0;G!````````````!X*GO\#A\3S
M_]E:X_D_````````````<#_OS#UV^[E>PSUAN]MS=>^O/^/[4M)7DKZ6]*VD
MJ.%YKTAZ3]+-0_5T=.?20_/GO71/_7YXH!(``````````````.`P?E^O7^"M
M7XR>_!W$P>F90[8S>>_ZU_EQFK8_=]?V>[?NG"[-J/UO/AZ_HWRB?I_[\[K]
M@],7#MG^PGW:?Z9>CNOVMF[=.5V>\?X_5R]_<H_V5V;<_LD#[1\<__:,V@<`
M``````````!P=-SM/7\`_Y_S_W%OH;$RG9];61G_WPZ9G]]\]TKUMQL_-YJ^
M+H+$9"O%]8*X`4?!HK^H3EW(M=ZX<NZ4O^C[%]<W-LY?OKJU^?;[OG])#V*K
M-H,\-TGBG^[E)E7;46[*?J2*2*M+QNS&67_YS22P5@595UV-@D*M)W%'JPNF
ME!7;D<[UDGKI[*LOG_']#[<'@55A'B=)W%^J2KAZ;!(7T5`5YIJV_KFXJ_K#
M7%=;^W$:)EK%695O$(1ZU5]/$I7&J1VJ@=1=;0A-;OJN])*_7M>9FE2K/"@B
MJTQ9]',INN+[)S?T(*@+70S"4.<#T]E=4NE069.U?.FNV@D&5C+(CH1Q(7UW
M>3O)[96=H.A$+7]_166X4X:2.^^.]\E&9595U<O+-#:E51NR6N<VJ\J>]/VW
MI*0$3T42WVLFWPL290<F[[H]C23OJG_)9'U5Q.FXB33(KKL=ZAFM7,#<$!1J
M>=F_8E2N;:&[;G4XK#)OEVE1IJJ081W'PTI;714,HG@2RZJ\Q$.V2I>M6UGV
M>K&-)MNJ5ERQI6I']L=J((.E]%!+8'NJEP2IM+(IGTKJ[_62V/5[WT%2E$E?
MRUA5=;G>A&4N8]JMFG7A3'7+][<R%^F!::GIW'@HQS4%T_FJ0W70PB3H2L,Z
M*Y3-XLZNSI<ER)W=EHMPHGN%:Z*K@WI@JJ['A96]"[HN2U6R'R1ENA>YCH=2
MUATF55RBP%;AD.,SJ(_`:1S>\#?=@!3&'3M!GMKJ(`IUD+HHAF;8\K=D_(-P
MQXU_-QBVY$1*$F.B\8RL>-[UH!.9O'#A<",O1\..&:[\+2?*:X<Y4;@R`D??
M_#WN_]W_]CON-1<N&U/=[3\JZ4FOZ5_6>\;&A<F'GG=,UOW8:!X[GQ5YK"W!
M!/YC5O7U8C7K7+/+/;E;#&UWM1W)_4#;K>(F`#C:;-YIR[>\Q+9SW9<ODC8V
M6;NO3?I!>2/>:X]_\N-"`!Q)[>F/^NT7V]TR38?5CTZV"-*]=ML_Q[D/````
M````````````````````````````S,P?@'&3'7C:[<$!`0```("0_J_N"`H`
M````````````````````````````````````````````````````````````
M``````````````````````!J``\``7C:[<$!`0```("0_J_N"`H`````````
M````````````````````````````````````````````````````````````
M``````````````!J``\``7C:[<$!`0```("0_J_N"`H`````````````````
M````````````````````````````````````````````````````````````
M``````!J``\``7C:[<$!`0```("0_J_N"`H`````````````````````````
M``````````````````````````````````````````````````````````!J
M``\``7C:[<$!`0```("0_J_N"`H`````````````````````````````````
M``````````````````````````````````````````````````!J``\``7C:
M[<$!`0```("0_J_N"`H`````````````````````````````````````````
M``````````````````````````````````````````!J``\``7C:[<$!`0``
M`("0_J_N"`H`````````````````````````````````````````````````
M``````````````````````````````````!J``\``7C:[<$!`0```("0_J_N
M"`H`````````````````````````````````````````````````````````
M``````````````````````````!J``\``7C:[<$!`0```("0_J_N"`H`````
M````````````````````````````````````````````````````````````
M``````````````````!J``\``7C:[<$!`0```("0_J_N"`H`````````````
M````````````````````````````````````````````````````````````
M``````````!J``\``7C:[<$!`0```("0_J_N"`H`````````````````````
M````````````````````````````````````````````````````````````
M``!J``\``7C:[<$!`0```("0_J_N"`H`````````````````````````````
M``````````````````````````````````````````````````````!J``\`
M`7C:[<$!`0```("0_J_N"`H`````````````````````````````````````
M``````````````````````````````````````````````!J``\``7C:[<$!
M`0```("0_J_N"`H`````````````````````````````````````````````
M``````````````````````````````````````!J``\``7C:[=!!$0``#`(@
MHQO="GOO(`()````````````````````````````````````````````````
M``````````````````````````````````#`6U5P-Y:/`(%XVNW!`0$```"`
MD/ZO[@@*````````````````````````````````````````````````````
>````````````````````````````````:@`/``$`
`
end

View File

@ -0,0 +1,35 @@
#!/bin/sh
#
# $FreeBSD$
#
mntpoint="/mnt/test-1"
#
# prepare
kldload geom_uzip
uudecode test-1.img.gz.uue
num=`mdconfig -an -f test-1.img.gz` || exit 1
sleep 1
#
# mount
mkdir -p "${mntpoint}"
mount -o ro /dev/md${num}.uzip "${mntpoint}" || exit 1
#
# compare
#cat "${mntpoint}/etalon.txt"
diff -u etalon/etalon.txt "${mntpoint}/etalon.txt"
if [ $? -eq 0 ]; then
echo "PASS"
else
echo "FAIL"
fi
#
# cleanup
umount "${mntpoint}"
rmdir "${mntpoint}"
mdconfig -d -u ${num}
kldunload geom_uzip

View File

@ -0,0 +1,15 @@
#!/bin/sh
#
# $FreeBSD$
#
#
# prepare
kldload geom_uzip
uudecode test-1.img.gz.uue
num=`mdconfig -an -f test-1.img.gz` || exit 1
sleep 1
#
# destroy
kldunload geom_uzip