summaryrefslogtreecommitdiffstats
path: root/usr.bin/mkimg/tests
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2014-09-20 21:02:54 +0000
committermarcel <marcel@FreeBSD.org>2014-09-20 21:02:54 +0000
commite6285cbc7cdddd6065630d467e0d9c0eba01ab27 (patch)
tree40aad134d5abe32a79a689f562efef56d46319b1 /usr.bin/mkimg/tests
parentb5317f446c89bf8c463168131bc2a5d1cc72ac73 (diff)
downloadFreeBSD-src-e6285cbc7cdddd6065630d467e0d9c0eba01ab27.zip
FreeBSD-src-e6285cbc7cdddd6065630d467e0d9c0eba01ab27.tar.gz
Add unit tests for mkimg(1):
Diffstat (limited to 'usr.bin/mkimg/tests')
-rw-r--r--usr.bin/mkimg/tests/Makefile17
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-apm.raw.gz.uu12
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-apm.vhd.gz.uu18
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-apm.vhdf.gz.uu15
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-apm.vmdk.gz.uu82
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-bsd.raw.gz.uu10
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-bsd.vhd.gz.uu17
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdf.gz.uu13
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-bsd.vmdk.gz.uu81
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-ebr.raw.gz.uu11
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-ebr.vhd.gz.uu18
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdf.gz.uu14
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-ebr.vmdk.gz.uu82
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-gpt.raw.gz.uu15
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-gpt.vhd.gz.uu22
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdf.gz.uu19
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-gpt.vmdk.gz.uu87
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-mbr.raw.gz.uu11
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-mbr.vhd.gz.uu18
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdf.gz.uu15
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-mbr.vmdk.gz.uu82
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-pc98.raw.gz.uu11
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-pc98.vhd.gz.uu18
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-pc98.vhdf.gz.uu14
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-pc98.vmdk.gz.uu82
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-vtoc8.raw.gz.uu10
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhd.gz.uu17
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdf.gz.uu14
-rw-r--r--usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vmdk.gz.uu81
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-apm.raw.gz.uu12
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-apm.vhd.gz.uu18
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-apm.vhdf.gz.uu15
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-apm.vmdk.gz.uu82
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-bsd.raw.gz.uu10
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-bsd.vhd.gz.uu17
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-bsd.vhdf.gz.uu13
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-bsd.vmdk.gz.uu81
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-ebr.raw.gz.uu11
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-ebr.vhd.gz.uu18
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-ebr.vhdf.gz.uu14
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-ebr.vmdk.gz.uu82
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-gpt.raw.gz.uu15
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-gpt.vhd.gz.uu22
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-gpt.vhdf.gz.uu18
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-gpt.vmdk.gz.uu87
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-mbr.raw.gz.uu11
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-mbr.vhd.gz.uu18
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-mbr.vhdf.gz.uu15
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-mbr.vmdk.gz.uu82
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-pc98.raw.gz.uu11
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-pc98.vhd.gz.uu18
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-pc98.vhdf.gz.uu14
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-pc98.vmdk.gz.uu82
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-vtoc8.raw.gz.uu10
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhd.gz.uu17
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdf.gz.uu14
-rw-r--r--usr.bin/mkimg/tests/img-1x1-512-vtoc8.vmdk.gz.uu81
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-apm.raw.gz.uu12
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-apm.vhd.gz.uu18
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-apm.vhdf.gz.uu15
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-apm.vmdk.gz.uu83
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-bsd.raw.gz.uu11
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-bsd.vhd.gz.uu17
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-bsd.vhdf.gz.uu14
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-bsd.vmdk.gz.uu81
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-ebr.raw.gz.uu12
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-ebr.vhd.gz.uu18
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-ebr.vhdf.gz.uu15
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-ebr.vmdk.gz.uu84
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-gpt.raw.gz.uu15
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-gpt.vhd.gz.uu22
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdf.gz.uu19
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-gpt.vmdk.gz.uu88
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-mbr.raw.gz.uu12
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-mbr.vhd.gz.uu18
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-mbr.vhdf.gz.uu15
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-mbr.vmdk.gz.uu84
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-pc98.raw.gz.uu12
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-pc98.vhd.gz.uu18
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-pc98.vhdf.gz.uu15
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-pc98.vmdk.gz.uu84
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-vtoc8.raw.gz.uu11
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhd.gz.uu18
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhdf.gz.uu14
-rw-r--r--usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vmdk.gz.uu83
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-apm.raw.gz.uu12
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-apm.vhd.gz.uu18
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-apm.vhdf.gz.uu15
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-apm.vmdk.gz.uu83
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-bsd.raw.gz.uu11
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-bsd.vhd.gz.uu17
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-bsd.vhdf.gz.uu14
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-bsd.vmdk.gz.uu81
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-ebr.raw.gz.uu12
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-ebr.vhd.gz.uu18
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-ebr.vhdf.gz.uu15
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-ebr.vmdk.gz.uu84
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-gpt.raw.gz.uu15
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-gpt.vhd.gz.uu22
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-gpt.vhdf.gz.uu19
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-gpt.vmdk.gz.uu88
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-mbr.raw.gz.uu12
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-mbr.vhd.gz.uu18
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-mbr.vhdf.gz.uu15
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-mbr.vmdk.gz.uu84
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-pc98.raw.gz.uu12
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-pc98.vhd.gz.uu18
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-pc98.vhdf.gz.uu15
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-pc98.vmdk.gz.uu84
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-vtoc8.raw.gz.uu11
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhd.gz.uu18
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhdf.gz.uu14
-rw-r--r--usr.bin/mkimg/tests/img-63x255-512-vtoc8.vmdk.gz.uu83
-rwxr-xr-xusr.bin/mkimg/tests/mkimg.sh141
114 files changed, 3751 insertions, 0 deletions
diff --git a/usr.bin/mkimg/tests/Makefile b/usr.bin/mkimg/tests/Makefile
new file mode 100644
index 0000000..b84f440
--- /dev/null
+++ b/usr.bin/mkimg/tests/Makefile
@@ -0,0 +1,17 @@
+# $FreeBSD$
+
+TESTSDIR= ${TESTSBASE}/usr.bin/mkimg
+
+ATF_TESTS_SH= mkimg
+
+SOURCES!= cd ${.CURDIR}; echo *.uu
+FILES= ${SOURCES:S,.gz.uu,,g}
+FILESDIR= ${TESTSDIR}
+
+${FILES}:
+ uudecode -p ${.CURDIR}/${.TARGET}.gz.uu | gunzip -c > ${.TARGET}
+
+rebase:
+ (cd ${.CURDIR}; atf-sh mkimg.sh rebase)
+
+.include <bsd.test.mk>
diff --git a/usr.bin/mkimg/tests/img-1x1-4096-apm.raw.gz.uu b/usr.bin/mkimg/tests/img-1x1-4096-apm.raw.gz.uu
new file mode 100644
index 0000000..3f148c0
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-1x1-4096-apm.raw.gz.uu
@@ -0,0 +1,12 @@
+# $FreeBSD$
+begin 644 img-1x1-4096-apm.raw.gz
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2OOO%I?GQT?IR\_4M]^MUMU<=GL1EFA#;%\X??GZN
+M?OERO]Y\N:VINXWI>K_>`^O[Z>;F\_A,NB?W8OZ]VUW394]75TS^1K_+G3MS
+MWBV7]Q0N)J[NMYOV]O[J_NKZZV],M]RO=_"W<3V^NB_MS;.K,[X7<YX?/%O^
+M"^'D$V[/-N'ZK._]F>?+<92\WW'A[J);+'?4/0WSP@OW6I$]3?C^=AS??KS\
+MX]_>?]3ZY;GQ^LH#]5-IR/I-HO5+='W6VN.\_&[]JBRIJF<^FP_UN_OO^D'D
+J^HSK5Z2^?N[^SD_^O__"^</%]K\U8>X3FJTP=S>?35_]'S/@3HZ37@``
+`
+end
diff --git a/usr.bin/mkimg/tests/img-1x1-4096-bsd.raw.gz.uu b/usr.bin/mkimg/tests/img-1x1-4096-bsd.raw.gz.uu
new file mode 100644
index 0000000..d48f343
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-1x1-4096-bsd.raw.gz.uu
@@ -0,0 +1,10 @@
+# $FreeBSD$
+begin 644 img-1x1-4096-bsd.raw.gz
+M'XL(".[%'50``VEM9RTQ>#$M-#`Y-BUB<V0N<F%W+F]U=`"ME,$.@R`,AN\^
+M1;WN0$J%Z:Y+=M]I.SNS/04//U!4*@-=0C$DI.V7O]2".!F`(L#^QYYVF*O@
+MRU2G:J21`^H6E`9]ALZ&X_JQ`W.8Y^TA0C,>)W-9:9S8V(RC/=PB6![!-2XK
+MB+1J22ZXE&/"U9Y5KSB54V<1^/ZK6%WJ[N;>=IN\L,^`'\`!L/,^XL"EO[#J
+MN\0RB)6;T0=QN;W#M3Q>!CC:*1<X[I7M;5Y=':L;"C>CV4[&P<EU$#ZY$X[*
+C/@0TOBSV#[11\9YVF+O@:P(J#RQV@XH<L/H"TT^@ZP4%````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhd.gz.uu b/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhd.gz.uu
new file mode 100644
index 0000000..1c0e8d7
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhd.gz.uu
@@ -0,0 +1,17 @@
+# $FreeBSD$
+begin 644 img-1x1-4096-bsd.vhd.gz
+M'XL(".[%'50``VEM9RTQ>#$M-#`Y-BUB<V0N=FAD+F]U=`"MESUOPR`0AO?\
+MBI.Z98C@C+&[1DWG2I7:-8YC1QGZH29#!O_X<C;88(R3M-@$8<$]O'<<B##6
+M/0`R`5F#K$"FU,X$R$?(<@#5J0NV-=>?T)1?GU5Y/EY6^FD6'8PSV\HU)WM,
+M0*A),L"")I%[:D-C,*N'S6%Y_#@8'&J<F5A($`BI@@AO'LEZ=41Z7K\^M<CM
+MH"[QU0U6ZK<3P`1P;HU(C+IMK[''"655UVW)H"A:F:8X'T['X.P(E[*1E25S
+M*JB6LU,X.6=U#VZYT&O1I8I*C$S5*G0<,J2V2AL3!Z^H5+F<OHN?4S72AX%4
+MD;T^[O4E87=1IPJ:P5J!H'2><Q=:RGF,FTB5?T5/NG9"-U006&HZL'7?C=Z`
+M`EN?Y&PFYN'%".HK2)_:6ZR8J,,=S7KEOCVP)&":T79/)>1X:P3?-V]3ZUL&
+MTN6/NZ/$:[A>,+\%E^B]:U&2`1?JZ'!,L]B`$W/J*&>JNYQ-(R=SF8_L['4&
+M7@/?`\NMK+:`_?K"H._1EX&.NS/ZP'>W(%SFCN<6#J^X"RYN-[NV\^J8KZZ,
+MO!C[\<ZX<><2Q-VY'0[C'@38GBPJ`]4HOPYW-"\K]^V`J(^J:&<?FJ,JED*A
+M@=$4*F`562%6L\EV;Q9*K3#219)P$2^2A(MXD21<Q(LDX2)>)`D7\2))N*@7
+02:G^(C"V^`74/'YQ?0P`````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdf.gz.uu b/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdf.gz.uu
new file mode 100644
index 0000000..6660765
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdf.gz.uu
@@ -0,0 +1,13 @@
+# $FreeBSD$
+begin 644 img-1x1-4096-bsd.vhdf.gz
+M'XL("._%'50``VEM9RTQ>#$M-#`Y-BUB<V0N=FAD9BYO=70`K91-;X,P#(;O
+M_`I+N_6`DI`8>JW6G2=-VJX%"E4/W2X[[)`?OQ@"Q'RUFPA1!'+\\-I.+$0[
+M`+0"D<^LRP9[B/ECHUW4T!0!30K:@$'(W'8Q3/;!#/;C^!Z'PWJ<7/-:QL6C
+MT>'4/5PO6#Z"2\A+,DHRX)8,+4YXEAAP>DV=RX2H_A2LV2IW76VSD5]89Y`U
+MR#.(S-L4!_;UA4'??BI#L7!7],$TW)QP*=\O`YRZ$RYP7+%:VW5U8JJNW+@8
+MR?AF/'AS"<)O;HM3VS8"U706=P+=KNFZ;+"O,7]:H/;`S3*(OO=A`E@#5H"&
+MWE,-N(<T"X&*GR1;?GU6Y??U)ZPPX:@@=3T_R5\E=%LP!9733_!,[X&^I^-E
+M=[U=.ES7JKH?:Z2D&P?1DW"1A_MR>'MND*=!73)-$H;9*S0(#5*RP+VZ$S_.
+IA--]L%4-A6ED=I-],,-LJR*<$2.O_]:VQ>'&1\4=ON@7D=A:0S`'````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-1x1-4096-bsd.vmdk.gz.uu b/usr.bin/mkimg/tests/img-1x1-4096-bsd.vmdk.gz.uu
new file mode 100644
index 0000000..ac4864b
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-1x1-4096-bsd.vmdk.gz.uu
@@ -0,0 +1,81 @@
+# $FreeBSD$
+begin 644 img-1x1-4096-bsd.vmdk.gz
+M'XL("._%'50``VEM9RTQ>#$M-#`Y-BUB<V0N=FUD:RYO=70`K9S=;]O*$<7?
+M\U<0SDO0!X%'_'X(T*9.@:(H$-Q<W/M:\:LQFL2!;10-H#^^7'+/^M`RO<3U
+M.'+$C69&.[/2V/G-@=)T^4J2O$WR/,G[I"B3%,GT3\LM2;/'Q70[UGS@_(_K
+M?_YVX->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-4096-gpt.raw.gz.uu b/usr.bin/mkimg/tests/img-1x1-4096-gpt.raw.gz.uu
new file mode 100644
index 0000000..c8adeb3
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-1x1-4096-gpt.raw.gz.uu
@@ -0,0 +1,15 @@
+# $FreeBSD$
+begin 644 img-1x1-4096-gpt.raw.gz
+M'XL("/#%'50``VEM9RTQ>#$M-#`Y-BUG<'0N<F%W+F]U=`"MEC]O@S`0Q?=\
+MBI>U52W;V`262JW42MW2JMW:@3]FC-2=#U\?A@2(C1KIP$)(Q_UR]_#C(F4X
+M`*,AJ\@U'>B?Q?+L=W>[@:;JVX#^]ZF$%5!X8,`U/B@U/>,<NFY<4@U9(5E)
+M:#7>3SAQ.?9BAFO/6=<K'9CC1,!-[7:W`:U%55T!OZ;Z]/`Z+$P.4T+[YR6,
+M@M6PYHP;>K7-O+Z7US<<GSX^"?9]:5=[:5#[_!95!K<22:IDNS_K=@-.4U:W
+M5GO"94G</H[+**O=P,56&F>VLL(>^M^[#3@KEUG%/"MSJ#-T%:HV@7M<X7+F
+MG6<H7.<X-,@=K$+3T4V;0RF@\#8I!HB&]B66."CHFH#]Z5V<`NQ!_-Z/]1DU
+M[HC82@=2ZIEAJQ2I=@^TMS?;Q1*7<:M7D'J63;URW"RQE0XDU:N">G&12+VH
+M9?I)M<DA$Z[F54\-4\/[PW^_KZ_I0'\4RS,`S0ADJ]!H/S;XW$$X1G<0CM$=
+MA&-U!P$9W4$X1G<0CM$=A&-UAP<ZR3?$":?"F.Q:%!HN6]67&L>7^I;M.KTU
+F^C>&>/QE.,8A3KCM(>YN;99QB!..=8@;_W]*RMT?5F[7A(@+````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhd.gz.uu b/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhd.gz.uu
new file mode 100644
index 0000000..6936b13
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhd.gz.uu
@@ -0,0 +1,22 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M=BV5B$9A8GV]11O]W_9UY/7[A/LZ\FV^Y@5V[2O
+?)]/N$^WKR;;[-/MZC4NZKR?UCXVQW0]_N`=E#`X`````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdf.gz.uu b/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdf.gz.uu
new file mode 100644
index 0000000..171e991
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdf.gz.uu
@@ -0,0 +1,15 @@
+# $FreeBSD$
+begin 644 img-1x1-4096-mbr.vhdf.gz
+M'XL("/+%'50``VEM9RTQ>#$M-#`Y-BUM8G(N=FAD9BYO=70`K96Q;H,P$(;W
+M/,5%W3(@^[`/LD9-YTI5VS5`(,J0=NG0@8>OC3'8.)"D,AQ@=/;'?[ZS8<P<
+M``*!%5?N\XYVE_AGN]JL.AHO'P/F#)HF`"8*:'"5PJD.R@K9-Y0Q#EJXNI1Q
+M!LC[MC%HD_%8)P[N.(P*;=[AXA*#L^$VCP&EA*((@.]6'\9.A]!`F8&0(`ER
+MO#?@S_W')&"#X['FS^#P%FX0S._!I7J4T].MC'E'.Y:)>5J<6%*G$*Q^*%@9
+MN?9$/AGGYAF86B45L+SWH0\<\@NCOFTH`[UP%_1!&&ZA<9G?GSLXO!$N^+AR
+M,;?+ZM:ANBIR,N1T9=RY<C7$7[D&AW$W`NQV%E6!JE=XGW>TKXE_&J#H@=%F
+MD/I?$:5`#5`-)'4[$T!;R'(7B'XEM=7W5UW]G'_=#&L<'_X<H>GQF.K50AE@
+MH3]"1]UV]#WM3YOSY61Q=JNR'Q:D)UTJB`C")3_<E]W;<X<\C.K2<)+(G;U2
+M`!/`N1=XK^[@ES-U^[P-MFZ@E)U,:]Z+Y[BZ56F<9)-1_\VMP5'D4E&UM_H#
+(GF2M3+\(````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-1x1-4096-mbr.vmdk.gz.uu b/usr.bin/mkimg/tests/img-1x1-4096-mbr.vmdk.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98.raw.gz.uu b/usr.bin/mkimg/tests/img-1x1-4096-pc98.raw.gz.uu
new file mode 100644
index 0000000..5398eae
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-1x1-4096-pc98.raw.gz.uu
@@ -0,0 +1,11 @@
+# $FreeBSD$
+begin 644 img-1x1-4096-pc98.raw.gz
+M'XL("//%'50``VEM9RTQ>#$M-#`Y-BUP8SDX+G)A=RYO=70`K91!#H,@$$7W
+MGF+<=F%@'*INFW3?3=NU-?44'+X@5`4$-0$,,?GP\C\#,&8:`"&P?F.,"_)6
+MN5T6EV*B\?$<4`CH0^!3`2<<:G\=P4"@_KP/QG'Y'$%67OOCN!)#D%T5%39P
+M-BYEWC^<`HL&2("X0HM'';[OKXW`F"^PP>$>;C;,C^!JO6HU4[E%/N-B@L&5
+MEE4N.$JY4PCV/156Y#TLB*VW;EUG8.H,#\!:JZ$+G.L+B[\NM(%.W(0_"./V
+M&M>X\_D*ASMQP<5]DK5-NRM#=T/F8M3^S3AX<S7$O;D&AWD?`II>9G4"]1L9
+9C'%!/BJW&R!98+8=)-3`X@?$\J!S108`````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-1x1-4096-pc98.vhd.gz.uu b/usr.bin/mkimg/tests/img-1x1-4096-pc98.vhd.gz.uu
new file mode 100644
index 0000000..8df641e
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-1x1-4096-pc98.vhd.gz.uu
@@ -0,0 +1,18 @@
+# $FreeBSD$
+begin 644 img-1x1-4096-pc98.vhd.gz
+M'XL("//%'50``VEM9RTQ>#$M-#`Y-BUP8SDX+G9H9"YO=70`K9=-;X,P#(;O
+M_16N=NNA2HP3VNNT[CQIVG8M9;3:81]:>^B!'[\8$DCX6KL%*`H*?O+:<4PJ
+M1'T`Z`3T'G0!6G$[)=!K2%<`IM->6-VE?80R__PH\M/;>6F/<E;#I/"M0G.V
+MQP3(#)("9CR(?N4VE`ZSO-D<%F_O!X=#BW,#DP9"4`9"O7&T:-0QZ?[V\:Y"
+M;EMU25]=:V5^.P)!(*7W1N+4;1N-#8Z,U7Y?72ED62737<%#T-$ZV\$IT;'R
+M9`X%U7-V"*>GK*[!+69V+NI4,8F1FKL)G804N6W2QL6A=YE4.1^_LN]CT=&'
+M(ZFB&WVRUY>,NXLV5="];!40I_.4NU!13EW<0*K\*WHZM"/;,$$0RG5@Y7X8
+MO18%OCXMQ43,QR=C5%_&^LS:$MG`?;RCO%V&9P/<[:\#*L5+J`M\<@[GK&]-
+MD--0W'TG+UH=^4CV_7E^B\CQP\IAE7*Y5!I6>*G"E\WS@,,8S^$:A[_A&L'R
+M$EQB:Y][TZC%YFLSVE'CYI8U;W$TI8[77'&5LRINLF"^ZMCY\PS"Y'`.8N55
+M!0_8S"^T^M9]&1BX.Z$/^NYFC$O#]Z6'PU_<A1"WFYS;:77SOKH\\F2\=E?&
+MA2N7(>'*K7$8MQ!059E-!G*-[-W'.\J'97C60+2E/MJW`VUMCJ:0+#":0K+5
+M.:)"*B:3[=HLU%9AI(TXXR)NQ!D7<2/.N(@;<<9%W(@S+N)&G'%1-^+:_,42
++8O8#/[LV_KT-````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-1x1-4096-pc98.vhdf.gz.uu b/usr.bin/mkimg/tests/img-1x1-4096-pc98.vhdf.gz.uu
new file mode 100644
index 0000000..49a64aa
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-1x1-4096-pc98.vhdf.gz.uu
@@ -0,0 +1,14 @@
+# $FreeBSD$
+begin 644 img-1x1-4096-pc98.vhdf.gz
+M'XL("//%'50``VEM9RTQ>#$M-#`Y-BUP8SDX+G9H9&8N;W5T`*V5L6Z#,!"&
+M]SS%1=TR1/BP#UBCIG.EJNT:0B'*T';IT(&'KVU,\&$@266PD-'AC__WV><D
+MZ2X`B9"4$\_Y0+O;\KM=;5:6)IK[@$I!&0)?-=#BT.@K)%02=&_4H&F&Q@+M
+M=G3U.*&#(<B-F@U,X)Q=&7G^T!I6&4@%BB#'6Q6^[]\F#&,\P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+MB,G4OXC)U+^(R=2_B,G4OXC)U+^(R=2_B,G4OXC)U+^(R=2_>$[3U-"_>+[Z
+M+.%-UC[<=;&K/S!?]K=^.NCUW_L/7+X_;?\$0$R_#;`HDO8:\)^^X'SYO-XF
+M3_K\J;JFZ>$6*WB%L^Y?;MR_<BFXJ-P'Q19E4I^/[O#G=S\]47!I5_`*=_7A
+MTX_APH8/?)9UN7Q`L4:Z]]2#:+GWP`KWVF.]?H#+G]N=SGF.%6O\X=/E\B'`
+M&JOGO$P)^@<_PR-N">>;/.RON=[&>5/N,_N[XI9R^1!@_?A5/<4-V^V4FVSA
+MNF?/]OG=O;[>76]\&%<?97OPG>M`MN_<%>YL2P3UPLRK>>+Z[_T'+N]/VS\K
+.8+X`OOH_SBV/UN!>````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.raw.gz.uu b/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.raw.gz.uu
new file mode 100644
index 0000000..f5ae94e
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.raw.gz.uu
@@ -0,0 +1,10 @@
+# $FreeBSD$
+begin 644 img-1x1-4096-vtoc8.raw.gz
+M'XL("/3%'50``VEM9RTQ>#$M-#`Y-BUV=&]C."YR87<N;W5T`*V230Z",!"%
+M]YSBX=(%:8=296N,.Q,3+R#8>@#7/;QMA@0*Y<>$H73S>%_F,2,$%Z`T3@1=
+MA:,(50FE4"HO&'A]>N!N7VLOSZNZ%UPN8YCT8M(BE@17C,IEQPYXCGQR&7B&
+MJ"$H"61<W;OJ5=Q2?XQK]HK+N'8K3OO;P%A8.\*]!KCWSL.0D[@6?N`DPY]<
+M!>;CN#+$9?-XPK,X+[A\TA_C^K@TL%"$DZGN4/`;XTR/DW^M2I[LSNZZ*O*S
+M%6<:M!9$*/4$=]`=CH*K\M\WB7M><(\B?GA55`?<;?<4!6#V`]&)2;VR!```
+`
+end
diff --git a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhd.gz.uu b/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhd.gz.uu
new file mode 100644
index 0000000..aadaa42
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhd.gz.uu
@@ -0,0 +1,17 @@
+# $FreeBSD$
+begin 644 img-1x1-4096-vtoc8.vhd.gz
+M'XL("/3%'50``VEM9RTQ>#$M-#`Y-BUV=&]C."YV:&0N;W5T`*V6R6[",!"&
+M[SS%2+UQ0-[BP+5JN56JU!?`21S40Q<!!PX\?&<29W$2!R@.QC)RYO,_X[$9
+MQNH'0$O0)6@+.J%QJD!O(%T#X*1KHNJY^PF7_.?;YJ?/\\H]ET4-XZQOY9N3
+MO9"@<)$4A*%%=$%CN#28U=/K?OGYM6]PPN&:A94&)2!!B!JMHUFKCDC;YX^7
+M"KGKU,FQNLX*OYD"IH#SWANR4;=K-;8XA59E6;44C*ED-LW[X4UTS@YP"1M8
+M]61.!;7G[!1.SUG=@ULNW%[4J8*)D6*/H>.0"AICVC1Q&#5,E?/QUQR.=J!/
+M!%)%M_KX:$Z&W14N543SLE.@*)WGW(6*<AKB)E+EH>AIWTZY`0:!)<V$J-SW
+MH]>AH*]/<S83\_!F!/49TH?'"W>4;H&D.V=2XT01<GA[L!9/FG[SXV<"N_OO
+M^)FU9W?E=*R!;>C6"::+V716F\</FS&QW*UQV:TXNKX**"Q8.\#M>K@\\F9D
+M(W<M9;*\#<B&[F;DKAR\SUT?P-%%RD;Z:ESGKNB9"`\WNEQ(';3'K(\K6MQ0
+MXQ5GV:0Z&S55LO)67&$@LR`ER&2$DXG#Y62%?T3,3/3AB<O[RO_4J2+<O1+M
+MHA*Q%2H'C*80@3:R0LYF,^/>\ZN=PDA5'^$B5GV$BUCU$2YBU4>XB%4?X2)6
+2?82+6O7I*O<6?^^O%OLJ#```
+`
+end
diff --git a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdf.gz.uu b/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdf.gz.uu
new file mode 100644
index 0000000..bcf2071
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdf.gz.uu
@@ -0,0 +1,14 @@
+# $FreeBSD$
+begin 644 img-1x1-4096-vtoc8.vhdf.gz
+M'XL("/7%'50``VEM9RTQ>#$M-#`Y-BUV=&]C."YV:&1F+F]U=`"ME,MN@S`0
+M1??YBBMUEP7R<PC;JLVN4J7^0""8J(NV4M5%%_[XVK%)L'$>JC"#!1KF>*X]
+M#&-A`(I0"Y#VI@2TA%*0Y!P]G']NL-MO8Q[?GNBE"L.N`HP[9S&$77/8*AMV
+MM8[`31+'KP,W8`V8*`(#KCE'-3=QU_(+N'8IN0'7W8LC-_?H#8S)<+L);K_P
+M8?"97`-WX/(^(,OE<B]79M_S.%_`.8=EL_P"[BQ73$)$@N.E[%"%.\7U)UR>
+MXPVQK)B=6;14^'`OKF_1&4@)J6<XJ2-.^"CMOF\+\V6'?:W2*Y2*BL#%:H]B
+MHR()&D#FV*LD:@5J4&^F0)$<,^S^Z]/L?]Y_I_M'L5$-0]E\O'!-T"U20[1^
+M$>K]\R2_A^?#^OWC,.)$5#4N[%KJJ9/F*BF5NW5]=/QU1YR<;Q)-=Z]38`J<
+M)\)C=KNT6#Q.G<2:`9T^ICE:\I(XBK7G<9IE4?\O98^CA4O%U=[J#P!,R,C=
+#!@``
+`
+end
diff --git a/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vmdk.gz.uu b/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vmdk.gz.uu
new file mode 100644
index 0000000..238837c
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vmdk.gz.uu
@@ -0,0 +1,81 @@
+# $FreeBSD$
+begin 644 img-1x1-4096-vtoc8.vmdk.gz
+M'XL("/7%'50``VEM9RTQ>#$M-#`Y-BUV=&]C."YV;61K+F]U=`"M7%UOY,81
+M?/>O&)Q?#@D@L);?#P<DCFP@"`P8/B-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%O
+M[S]J_?+<>'WE@?JI%&[](='Z);H^:^UQ7GZW?E665-4SG\V'^MW]=_T@<GW6
+G]:M]_=S]G9_\=_^%\X>+[?_6A+E/:+;"W-U\-GWU?YW"XEV37@``
+`
+end
diff --git a/usr.bin/mkimg/tests/img-1x1-512-bsd.raw.gz.uu b/usr.bin/mkimg/tests/img-1x1-512-bsd.raw.gz.uu
new file mode 100644
index 0000000..874e570
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-1x1-512-bsd.raw.gz.uu
@@ -0,0 +1,10 @@
+# $FreeBSD$
+begin 644 img-1x1-512-bsd.raw.gz
+M'XL(".;%'50``VEM9RTQ>#$M-3$R+6)S9"YR87<N;W5T`*V4P0Z#(`R&[SY%
+MO>Y`2H7IKDMVWVD[.[,]!0\_4%0J`UU",22D[9>_U((X&8`BP/['GG:8J^#+
+M5*=JI)$#ZA:4!GV&SH;C^K$#<YCG[2%",QXG<UEIG-C8C*,]W")8'L$U+BN(
+MM&I)+KB48\+5GE6O.)539Q'X_JM87>KNYMYVF[RPSX`?P`&P\S[BP*6_L.J[
+MQ#*(E9O1!W&YO<.U/%X&.-HI%SCNE>UM7ET=JQL*-Z/93L;!R740/KD3CLH^
+B!#2^+/8/M%'QGG:8N^!K`BH/+':#BARP^@+33Z#K!04`````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-1x1-512-bsd.vhd.gz.uu b/usr.bin/mkimg/tests/img-1x1-512-bsd.vhd.gz.uu
new file mode 100644
index 0000000..ef644e4
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-1x1-512-bsd.vhd.gz.uu
@@ -0,0 +1,17 @@
+# $FreeBSD$
+begin 644 img-1x1-512-bsd.vhd.gz
+M'XL(".;%'50``VEM9RTQ>#$M-3$R+6)S9"YV:&0N;W5T`*V7/6_#(!"&]_R*
+MD[IEB.",L;M&3>=*E=HUCF-'&?JA)D,&__AR-MA@C).TV`1AP3V\=QR(,-8]
+M`#(!68.L0*;4S@3(1\AR`-6I"[8UUY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+IH)=_;S]P_G!8_PD!YP_8+2KW0:=%F=3'O3O\_>-OSR2<'\T27L)=?'CR
+MTW!APSL^BSF?/V!7+5/]0.C-!Y9P[WRL=X_A\I=VIW.*?<D:?WAR/G^(K=KJ
+M.<_ODN)Q'O_DO1'.-WG<7W.YC>,JW1?VEURFZYJH?GRHGN+JW;J1;K(.U[YX
+MMB_O[MWE[CKCP[CX*-:=[UP79/W.7<(=;1M!.7>69?A_^??V`^=/A_6?)6`^
+,!WSS?ZE[ZN&@70``
+`
+end
diff --git a/usr.bin/mkimg/tests/img-1x1-512-ebr.raw.gz.uu b/usr.bin/mkimg/tests/img-1x1-512-ebr.raw.gz.uu
new file mode 100644
index 0000000..70326d3
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-1x1-512-ebr.raw.gz.uu
@@ -0,0 +1,11 @@
+# $FreeBSD$
+begin 644 img-1x1-512-ebr.raw.gz
+M'XL(".?%'50``VEM9RTQ>#$M-3$R+65B<BYR87<N;W5T`*V4S0Z#(`S'[SY%
+M=]W!0`?379?LOLNV,[KY%#S\BO@!(J@)@&A2^LN_MH4Q.P#H65UQ@RX70Q?G
+MHJ?QYC"PZU:!%M>2%QV@I>3P08MQ!\<9((_K.[FX;^YPNV-`*4&I`/@:]:'Q
+M$@A,K>QQ@[Z7_IST"0.4%0@)\@HU[@WX\WBOI4/P7/_/XG`+-PGF>W`7X^6<
+M="LC;M!SF=CWB!,I=81@OT/!RLRU)^J%GYMG8-0E+;!ZL*$/G/(+L[Y;*`.]
+M<!/Z(`Q7&5SEG^<.#C?"!1_7)'.;5G<*U;69DR&7G;&S<PW$[UR+P[P7`?8W
+>"U4@G0KWN$$_2W]:H!B`V?Z@0`,L_F-6J)F4!@``
+`
+end
diff --git a/usr.bin/mkimg/tests/img-1x1-512-ebr.vhd.gz.uu b/usr.bin/mkimg/tests/img-1x1-512-ebr.vhd.gz.uu
new file mode 100644
index 0000000..c1f997c
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-1x1-512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dev/null
+++ b/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdf.gz.uu
@@ -0,0 +1,14 @@
+# $FreeBSD$
+begin 644 img-1x1-512-ebr.vhdf.gz
+M'XL(".?%'50``VEM9RTQ>#$M-3$R+65B<BYV:&1F+F]U=`"ME;%N@S`0AO<\
+MQ47=,D2VL0^R1DWG2E7;-4`@RI!VZ="!AZ^-,?%A(*0R&#`ZW\=_OK-AS!X`
+M^AIMTX9F.SB:U6;5TGCQ,+"N1X$65VHO/4"W7'4=W1CW<)R!X-/ZUC[N%#O<
+M^C&@4I#G`?#=Z1/&2PI@^<A]VM#LM_3L]4D#5"E(!0HA$TL#_CQ\C*5#\ECS
+M9W'B'JX7S)?@$N/EC?0K8]K0W,K$/AU.SJG3"%8]%*R*7'LR&_CY>0:F5TD)
+M+.ML@@+[_,)-WRZ4(4BX,_H@##<WN)2.YQY.W`D7**Z8S>V\NG6HKHR<##5<
+M&0M7KH'0E6MQ(NY&(-J=15>@'A7>IPW-ZY:>%B@[8+09Q.Y7A`E@#5@!*M-/
+M)>`.TLP'"EI)3?G]594_EU\_PP;'^S]'V(R_2,QJP11$;CZ")]/W]#T=SIO+
+M]>QP;JMR'Y9H)EUIB`S"11KNR_[MN44>;^J2<)+0G[U"`I/`.0F\4W>DY8SM
+H/N^"K6HH5"O3-?)"#*-;E<$I-O#Z;VXM#B.7BJZ]U1_9@4$XOP@`````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-1x1-512-ebr.vmdk.gz.uu b/usr.bin/mkimg/tests/img-1x1-512-ebr.vmdk.gz.uu
new file mode 100644
index 0000000..9ad3787
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-1x1-512-ebr.vmdk.gz.uu
@@ -0,0 +1,82 @@
+# $FreeBSD$
+begin 644 img-1x1-512-ebr.vmdk.gz
+M'XL(".C%'50``VEM9RTQ>#$M-3$R+65B<BYV;61K+F]U=`"M7%V/W,81?/>O
+MH*67(`\+UI)<D@\"$N<<(`@"&)9COX:?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-M$OX@PWS;1+R+,MTWTBPCS;1/](L)\VT2_B##?-M$O(LRW3?2+"/-M
+M$_TBPGS;1+^(,-\VT2\BS+=-](L(\VT3_2+"?-M$OX@PWS;1+R+,MTWTBPCS
+M;1/](L)\VT2_B##?-M$O(LRW3?2+"/-M$_TBPGS;1+^(,-\VT2^"\VT;_2(F
+M4_TB)E/](B93_2(F4_TB)E/](B93_2(F4_TB)E/](B93_2(F4_TB)E/](B93
+M_2(F4_TB)E/](B93_2+F/#?4+V(VU2]B-M4O8C;5+V(VU2]B-M4O8C;5+V(V
+MU2]B-M4O8C;5+V(VU2]B-M4O8C;5+V(VU2]B-M4O8C;5+Y[S/#?4+YYO/DMX
+M%Q5/=UOLI@\LT?_FA/,<[5X)]Z@L#LO15?YB.38AF?0-\?5]K>E&ZW+GWY:P
+MJK*NNTGX3ZYO_33A[;-5;_^.W[A^<]K_">M;/PZSJMW'Q%:7K#D?+?BG;W]\
+M5O"6SNQQV=+=?/3T\W1AP0<^R;HLUX^>%D]],N(WKD^/R79FNO)+J],IS[%B
+MC3]ZNBR;9W&ZS^N,8'A2,SQ#EK"_V=/ZVMMEG'?E?F%]-\A2ENY'D'[XJN[B
+M#NLBY6;[=/T7]_;+J_OZ=G6#\694S]\9!]^Y+LG^G;NE.]L"P65%EDTZ<?MW
+=_,;UN]/^SY:P]`G-.EBZ#T[+O_H__903[2]?````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-1x1-512-gpt.raw.gz.uu b/usr.bin/mkimg/tests/img-1x1-512-gpt.raw.gz.uu
new file mode 100644
index 0000000..98d9945
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-1x1-512-gpt.raw.gz.uu
@@ -0,0 +1,15 @@
+# $FreeBSD$
+begin 644 img-1x1-512-gpt.raw.gz
+M'XL(".C%'50``VEM9RTQ>#$M-3$R+6=P="YR87<N;W5T`*V534_#,`R&[_L5
+MWA5$E*1)FIWXD$#B-A#<N/1C/:%)W,M_)VX:UG9Q89+3J*KD^JGM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VLU2YML(R`4PMOA'X;6[G72<<,)(];T=)90URDXC^!%,(.YO
+MEJUQ,C^26J@9<^K"V!A.;4F=@CL_<[$84\4D1FGNQG4,2H[/)FV\'U;#I,KC
+M_:_ZSWUWI!]/I(J:]&.KN2)M+G>IPOV?G08"TWG+7+"4AV-<)%5>Y#T5ROGH
+M&B?DTD]P:W[HO1D%2_T4RS=\G@Y&4K\:]3-K*Z\C]_3$<)&%GPG8-*<!O0=#
+MW&1PH]%_MHYTW6S1F"2S8XN-@.0+_S4M<7R;_C2@E%#7*^`WKY^VX9"VX.TP
+M,4QQ$`RD*7YS.EO;I5[J=WGU$:[??_Z*L)O97(WITK6X@DS5[=LC[=8K;3)W
+M'UMLFH_9Q_NHL442]RZZ=C4N-J-4&A<;:9S8DG);V?\74BWS4*I:2E42*@Y*
+M0ULG<=\#''5=[G"Z45!JW,(E`VWW\E;A1@:562:5A7#@)NYF8S>[<(/`X?`I
+M.XRPM]GO-TZ_CKF,B(WT1,I['=_*"%3J"7,AQ%'7Y:Y"[TDR[^U<LL1&>B+I
+MO7KT7MQ)J%1LZ4Z[6I:]"G$-K?>8;1_-^C#U>WU/3PS76?@9@=QM0V3[&G>%
+ME$Q#X8!D&@JW?@DU9&(SF*=&6;F@$%48Q!%6&,015AC$D588!!)6&,015AC$
+M$588Q)%6&$7;""G7".6E#4`!31>JD6QI!A\(WW)X'-]JGS8:H7@P*!LA]50C
+MU'=)8_UU9"QA(Z2H&R'E"BG168;RC=!:A^><92C?""U>_(*S#!5OA)Y[EH$X
+8PK,,Q!&>92"..%6P;SG[!W<O66(`$P``
+`
+end
diff --git a/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdf.gz.uu b/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdf.gz.uu
new file mode 100644
index 0000000..7e6c736
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdf.gz.uu
@@ -0,0 +1,18 @@
+# $FreeBSD$
+begin 644 img-1x1-512-gpt.vh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6VU:U+5;=X+CM]IOUG"M<?5F5?XB/'G\=_J-R^O#^K\%L`B`
+M9BLL_",%[>X.#V=X=W@XP[O#PYG>'1[0\.[P<(9WAX<SO#L\G.G=4?@'1MI]
+MB7LX?^WU4\T;_PS_<GW5I+^.I_7]^&9>V%>K=&?.,?G5_\27^/7-&`R_Q#W<
+BDU_BXY!.-OP\2-;P2]S#F7Z)%_[IG=D7_P=,%9H/M&4`````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-1x1-512-mbr.raw.gz.uu b/usr.bin/mkimg/tests/img-1x1-512-mbr.raw.gz.uu
new file mode 100644
index 0000000..494fe71
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-1x1-512-mbr.raw.gz.uu
@@ -0,0 +1,11 @@
+# $FreeBSD$
+begin 644 img-1x1-512-mbr.raw.gz
+M'XL(".G%'50``VEM9RTQ>#$M-3$R+6UB<BYR87<N;W5T`*V4R[+"(`R&]WV*
+MN'7!A`C'NG7&O1MUC?7T*7AX@^D%BJWM#)!29@+?_"$$1&D`A@#=EW'>X<\J
+M[;[:5Q^:?FX#U@AMFP$5`P77,(X7L#G;3=A00Q#.'YM&(-W-Q<"KL>U4A'L-
+MNW*;=\0X);@^W'8;T%IP+@/>>GU4.ATF`.T1C`7[!S6M#?AQN4\"%IPN=7Z"
+MHU^X0;!>@SN$7='*^&;,._QX3>3?X\R2.D;@_Z9@;>&[9^K)OCC/@%PE#6#=
+M^2@%#OF%4=\IET%)N`OZ(`_7!=PQ7:\C'/T(%U+<<S&WR^IVN;JF<#+LM#)6
+K5FZ`I)4K."K[$-#G9>$;R*OR<=[AKRKM`C0=L-@)&@K`Z@UK>@7\E`8`````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-1x1-512-mbr.vhd.gz.uu b/usr.bin/mkimg/tests/img-1x1-512-mbr.vhd.gz.uu
new file mode 100644
index 0000000..69446fd
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-1x1-512-mbr.vhd.gz.uu
@@ -0,0 +1,18 @@
+# $FreeBSD$
+begin 644 img-1x1-512-mbr.vhd.gz
+M'XL(".K%'50``VEM9RTQ>#$M-3$R+6UB<BYV:&0N;W5T`*V735.#,!"&[_T5
+MZWCST$F69*%71ST[XZA7`<'QX,>H!P_\>!-(0@($BZ:E%";9AW<_LDT9&UX`
+ME`&U0`V0U->Y`#I`7@"H07-@?^;F%KKZ[;6IOYZ_]^;5[0889[Y5:*[M,0.A
+M'I(#EOHA]*BOH;.8_>GET]GSRY/%H<'9!PL"@2`51,R>0\RITZ2K\YN+'ODP
+MJLOFZD8K]:D$,`&<>S,RJ^[!:70XH:S:MC]R*,M>ICV"FV!@=':"DVQBY<E<
+M"JKG[!*.UJRVX,YV)A=#J:C"R-59A8Y#COI:E8V-P^Q0I?+]^5Y^?#83?1@I
+M%7+Z^&PLB[N+IE303C8*A"[G-7>AIWQ-<0NE\J_H46@GS(4*`I-V`'OWP^B-
+M*/#U$6<K,8\G(ZJOU/K4VF+EPCD^T)WOP[<#5M4V8,$&A2'..5S5SN%2CAX-
+M13(&$WD\(2=>_*K'Q/FMVFU`*77'F`)OK;XZ=3H:#92Y[KZ2H,!C';Z_O%M:
+M;DUD]?ZQ637X&\X)YL?@,M-*[4R_,N(#W5@FP[?%B35U>@DWFYR5B6NO*29V
+M?IZ!J552`RN\)N,!77YAU'>8R\#`W15],'>WU+@\G,\]'/[B+H2X:C6WZ^I.
+MYNKJQ,EHIROCR)6K(>'*'7"8MA%@WUE4!:I9\W-\H+O>A^\!B.:7(]E/$9K>
+METRA,,!D"H5MIND49FRUV+96(1F%B?;U%&_W?]G7D]?N$^SKR;;[F!7;M*\G
+>T^X3[>O)MOLT^WJ-2[JO)_6/C;'=#W^X!V4,#@``
+`
+end
diff --git a/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdf.gz.uu b/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdf.gz.uu
new file mode 100644
index 0000000..b9c8a97
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdf.gz.uu
@@ -0,0 +1,15 @@
+# $FreeBSD$
+begin 644 img-1x1-512-mbr.vhdf.gz
+M'XL(".K%'50``VEM9RTQ>#$M-3$R+6UB<BYV:&1F+F]U=`"ME;%N@S`0AO<\
+MQ47=,B#[L`^R1DWG2E7;-4`@RI!VZ="!AZ^-,=@XD*0R'&!T]L=_OK-AS!P`
+M`H$55^[SCG:7^&>[VJPZ&B\?`^8,FB8`)@IH<)7"J0[*"MDWE#$.6KBZE'$&
+MR/NV,6B3\5@G#NXXC`IMWN'B$H.SX3:/`:6$H@B`[U8?QDZ'T$"9@9`@"7*\
+M-^#/_<<D8(/CL>;/X/`6;A#,[\&E>I33TZV,>4<[EHEY6IQ84J<0K'XH6!FY
+M]D0^&>?F&9A:)16PO/>A#QSR"Z.^;2@#O7`7]$$8;J%QF=^?.SB\$2[XN'(Q
+MM\OJUJ&Z*G(RY'1EW+ER-<1?N0:'<3<"['8658&J5WB?=[2OB7\:H.B!T6:0
+M^E\1I4`-4`TD=3L30%O(<A>(?B6UU?=77?V<?]T,:QP?_ARAZ?&8ZM5"&6"A
+M/T)'W7;T/>U/F_/E9'%VJ[(?%J0G72J(",(E/]R7W=MSASR,ZM)PDLB=O5(`
+M$\"Y%WBO[N"7,W7[O`VV;J"4G4QKWHOGN+I5:9QDDU'_S:W!4>124;6W^@.>
+'9*U,OP@`````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-1x1-512-mbr.vmdk.gz.uu b/usr.bin/mkimg/tests/img-1x1-512-mbr.vmdk.gz.uu
new file mode 100644
index 0000000..2464362
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-1x1-512-mbr.vmdk.gz.uu
@@ -0,0 +1,82 @@
+# $FreeBSD$
+begin 644 img-1x1-512-mbr.vmdk.gz
+M'XL(".K%'50``VEM9RTQ>#$M-3$R+6UB<BYV;61K+F]U=`"M7%V/W,81?/>O
+MH*67(`\+UI)<D@\"$N<<(`@"&)9COX:?T2&V))P.00SLC\\,.357O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OBEG+Y$&#]^%4]Q0W;[92;;.&Z
+M9\_V^=V]OMY=;WP85Q]E>_"=ZT"V[]P5[FQ+!/7"S*MYXOKO_0<N[T_;/RM@
+-O@"^^C_.+8_6X%X`````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-1x1-512-vtoc8.raw.gz.uu b/usr.bin/mkimg/tests/img-1x1-512-vtoc8.raw.gz.uu
new file mode 100644
index 0000000..c35f98d
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-1x1-512-vtoc8.raw.gz.uu
@@ -0,0 +1,10 @@
+# $FreeBSD$
+begin 644 img-1x1-512-vtoc8.raw.gz
+M'XL(".S%'50``VEM9RTQ>#$M-3$R+79T;V,X+G)A=RYO=70`K9)-#H(P$(7W
+MG.+AT@5IAU)E:XP[$Q,O(-AZ`-<]O&V&!`KEQX2A=/-X7^8Q(P07H#1.!%V%
+MHPA5":50*B\8>'UZX&Y?:R_/J[H77"YCF/1BTB*6!%>,RF7'#GB.?'(9>(:H
+M(2@)9%S=N^I5W%)_C&OVBLNX=BM.^]O`6%@[PKT&N/?.PY"3N!9^X"3#GUP%
+MYN.X,L1E\WC"LS@ON'S2'^/ZN#2P4(23J>Y0\!OC3(^3?ZU*GNS.[KHJ\K,5
+L9QJT%D0H]01WT!V.@JORWS>)>UYPCR)^>%54!]QM]Q0%8/8#T8E)O;($````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhd.gz.uu b/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhd.gz.uu
new file mode 100644
index 0000000..e3f9594
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhd.gz.uu
@@ -0,0 +1,17 @@
+# $FreeBSD$
+begin 644 img-1x1-512-vtoc8.vhd.gz
+M'XL(".S%'50``VEM9RTQ>#$M-3$R+79T;V,X+G9H9"YO=70`K9;);L(P$(;O
+M/,5(O7%`WN+`M6JY5:K4%\!)'-1#%P$'#CQ\9Q)G<1('*`[&,G+F\S_CL1G&
+MZ@=`2]`E:`LZH7&J0&\@70/@I&NBZKG["9?\Y]OFI\_SRCV710WCK&_EFY.]
+MD*!PD12$H45T06.X-)C5T^M^^?FU;W#"X9J%E08E($&(&JVC6:N.2-OGCY<*
+MN>O4R;&ZS@J_F0*F@//>&[)1MVLUMCB%5F59M12,J60VS?OA373.#G`)&UCU
+M9$X%M>?L%$[/6=V#6R[<7M2I@HF18H^AXY`*&F/:-'$8-4R5\_'7'(YVH$\$
+M4D6W^OAH3H;=%2Y51/.R4Z`HG>?<A8IR&N(F4N6AZ&G?3KD!!H$ES82HW/>C
+MUZ&@KT]S-A/S\&8$]1G2A\<+=Y1N@:0[9U+C1!%R>'NP%D^:?O/C9P*[^^_X
+MF;5G=^5TK(%MZ-8)IHO9=%:;QP^;,;'<K7'9K3BZO@HH+%@[P.UZN#SR9F0C
+M=RUELKP-R(;N9N2N'+S/71_`T47*1OIJ7.>NZ)D(#S>Z7$@=M,>LCRM:W%#C
+M%6?9I#H;-56R\E9<82"S("7(9(23B</E9(5_1,Q,].&)R_O*_]2I(MR]$NVB
+M$K$5*@>,IA"!-K)"SF8SX][SJYW"2%4?X2)6?82+6/41+F+51[B(51_A(E9]
+1A(M:]>DJ]Q9_[Z\6^RH,````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdf.gz.uu b/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdf.gz.uu
new file mode 100644
index 0000000..bb8e698
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdf.gz.uu
@@ -0,0 +1,14 @@
+# $FreeBSD$
+begin 644 img-1x1-512-vtoc8.vhdf.gz
+M'XL(".S%'50``VEM9RTQ>#$M-3$R+79T;V,X+G9H9&8N;W5T`*V4RVZ#,!!%
+M]_F**W67!?)S"-NJS:Y2I?Y`()BHB[92U447_OC:L4FP<1ZJ,(,%&N9XKCT,
+M8V$`BE`+D/:F!+2$4I#D'#V<?VZPVV]C'M^>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BW\_OWX1H[[,_G$6_&/UQ'F]8%9E__%`
+1"L!L"DDX8/$'F8$ZXZ<%````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-4096-apm.vhd.gz.uu b/usr.bin/mkimg/tests/img-63x255-4096-apm.vhd.gz.uu
new file mode 100644
index 0000000..0349231
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-4096-apm.vhd.gz.uu
@@ -0,0 +1,18 @@
+# $FreeBSD$
+begin 644 img-63x255-4096-apm.vhd.gz
+M'XL("/_%'50``VEM9RTV,W@R-34M-#`Y-BUA<&TN=FAD+F]U=`"M5EUOVR`4
+M?<^ON-+>*BT"#-?=T]1JS=ND:M6>6\O!5:2UC9I(ZX-__+A\U#@&U\UP$,'"
+M]W`X]P,8<P\`5H`=H`94-*XEX#>H+P',I&_"]MR_0M^^/.OVN'M;^Z=?.3#.
+M8JNQ.=F+"J19I`;1T"*XI3'T`6;]Y>;Q8O?T&."$APL+2P0I0!D0.5D'V3L[
+M0MI<W_VPD`\#NVK*;K!R?UT'51=]405V#[;_'F]6&BOS/;4:*F5IAC9Z&4T0
+MG%I'3X!3[,0JHID2-=IL"@[GK#X#=['ROG"A8@*C-KV1CD,M:&S")N@P:294
+MW@[[YO6@3_B)3*C@.S\^F:ORVQ4^5$3XV#.0%,YSVP6+<CR%2X3*?ZF'8SOI
+M!T8$IL*$L-L?JS=`0<P/.9O1/.^,++^&^)G45"(DNVW51QN^^44P[-0=3<:[
+M9^O7TK3)$+E-1<7PPL<3_>W/9+BTQ$]R"F.*Y)9B>`F_J_W^CT[`B5+;=7#5
+ME)WJ?,[9I',EVO:N=*LNL+LWV7;<'7<OS_<!C@H5E5J+N)S=4[-/LE.%?:L7
+M^O8RRA,V\2T$?KIT[&GK#B3AZ814PQDDMH:XHCGS/@'<O&IM3J&OOS=WL7Y:
+MEN7'V0+]1*2?2Y)8O[BV\-PA?CZ_6?WH,*D3L3GH=_CK`C'P*ZU?X_5C3:+/
+M3_2WZ_'/`0I?3(M59S%4OS(,I0<LQE`..5R*(=>SSORLE]$S+'35Q7R5.>>J
+J2W`%K[KH2U;6ROTMO>JB+UF%KKH$5_"J2W!%K[IH"^KJ'[J1;&,?#0``
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-4096-apm.vhdf.gz.uu b/usr.bin/mkimg/tests/img-63x255-4096-apm.vhdf.gz.uu
new file mode 100644
index 0000000..e1b6626
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-4096-apm.vhdf.gz.uu
@@ -0,0 +1,15 @@
+# $FreeBSD$
+begin 644 img-63x255-4096-apm.vhdf.gz
+M'XL("/_%'50``VEM9RTV,W@R-34M-#`Y-BUA<&TN=FAD9BYO=70`K57);L(P
+M$+WS%2/UAM3(\3*FIRXJW"JAHIXA(@F*5""B2.TA'U^OX"P@6MF,+$<3/]Z\
+M9T\(L0.`"Q`4B`KB@IGY_-P):*;OB1HD\:,96;#TVJ[+<$EG-*.Q!:0Z+0CP
+MO+>/A8!I.]',W[J`%D[SXRE(H@/7@.(F?L]U_5D,P-%8Y5HXUF<G2K-.`20%
+MR0$?W(PE8*'3CMVRS@['ZECM=TL/QQ4<YGJS_`N[;58/LA.1O>4W>CMQ"^H`
+MV]Z"Y\=CGSUN[$`MO#)"!:<@&'`.-%?$A<ZIYQ[@[%`4+XO7^X_9(M2/\\C\
+M\`;]:*"?O22A?A#RP]CZX57])`,I!\[F6;^O;WL0/;_(^J7$Z4>R@?ERHIDG
+M[9\%Y`XP&D-TW1F9N^M:1.9[P"0$I&=[#>!ZORO6Q^HGO,'HNG-9#H?>3YG^
+M%J`$FID6D^MUP.]NNAE7VXV'\]W/_['R^F1QMTILESM3!AO(U9D=ZXN$'?44
+M3U:V"G?L5F9^#(OEIV*+$KBEZ:/UT$IHN*>V&1;.=+_PY?]Z:^$P\E%1'\K1
+)+TV"K"_2!P``
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-4096-apm.vmdk.gz.uu b/usr.bin/mkimg/tests/img-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-63x255-4096-bsd.raw.gz.uu
new file mode 100644
index 0000000..b44538e
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-4096-bsd.raw.gz.uu
@@ -0,0 +1,11 @@
+# $FreeBSD$
+begin 644 img-63x255-4096-bsd.raw.gz
+M'XL("`#&'50``VEM9RTV,W@R-34M-#`Y-BUB<V0N<F%W+F]U=`"ME#L.@S`,
+M0'=.X;E#E&])%RI5ZMZIG2F%4^3P38`4FQ#H$`<B(MM/_N!P/@F`EL#;C3VO
+M<#=&EZM.U4B3`6AJT`;,&:PWY\M##D3A7O<GP^)FG-CSRN/82B).'N%BP&K(
+MX:X(I[QR0)9<(*].@.KG`_Y&N&9Z(T[O1><KP?LM13994ZIVL;=VY8?[#*('
+MH8#;62<I\-=?6.*[I&%(DNY.?)"FVP9<3>T%PLF#=('BW@&'^DE:>%"])HVN
+M*]P,M9Z,/R<W0.CD3CA9]B*0X\WB_T!OE>YYA7LPNB:@GH'%*EA_K"=67[CE
+&;;$%!0``
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhd.gz.uu b/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhd.gz.uu
new file mode 100644
index 0000000..9e10396
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhd.gz.uu
@@ -0,0 +1,17 @@
+# $FreeBSD$
+begin 644 img-63x255-4096-bsd.vhd.gz
+M'XL("`#&'50``VEM9RTV,W@R-34M-#`Y-BUB<V0N=FAD+F]U=`"MESUOPR`0
+MAO?\BI.Z9;#P&6-W::*HZ5RI4CN[Q(XR]$--APS^\>5LB`]_)6VQ"<*">WB/
+M.Q`1HGT`5`*J`E6"2JF=25"WD.4`IM,6;.K8?D*M/]Y+_7TX1?:I%RTL%MS*
+M-R=[3$":23+`@B91.VI#[3#1S7:_/+SM'0XMSDTL%4B$U$#D8)Y<G-41Z6'S
+M=-]7EPS5=5;M/%4%2<5&)%Q=%*TX3AHK,YZ*@DHV,EWQ/KP.CO/4I:)GQ62.
+M+2IS=@RGYJQ^@ULN;"S:5#&)D9E:@(HA0VJ;M''K,"@F54['S^+K6/;TX42J
+M*!:,?I^<=A=MJJ`;;!5($CCG+C248Q\WDBK_6CWEVTG;,(L@4M>!C?O^ZG4H
+MX/I4+&;6?#H8D_H*TF?VEBA&ZNF.>A/Y[QFH"9AFM-U3!3E>NX(OV^>Q^.J)
+M=/GC[M!X"><$\]/`QZT8+FG#T5%8\H*.(2F[;SF"NS._=8>3<^HH9\JQCDEG
+MT\#)K/.>'8\SQ"7$"8B<934#GN,+G;[;H0STW)W1!T-W"\)E_OB8X?""N^#C
+M7NVYS`9W(;RP>NNA.ATX&+O^SKARYQ+$W[DM#L,>!-B<+"8#S:AA/=U1/T;^
+MVP+1'E7!SCYT1U4HA=("@RDTP#*P0BQGD^VW6:BLPD`72<(%O$@2+N!%DG`!
+>+Y*$"WB1)%S`BR3A@EXDE?F+(,3B!S97<<M]#```
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhdf.gz.uu b/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhdf.gz.uu
new file mode 100644
index 0000000..1605f5a
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhdf.gz.uu
@@ -0,0 +1,14 @@
+# $FreeBSD$
+begin 644 img-63x255-4096-bsd.vhdf.gz
+M'XL("`#&'50``VEM9RTV,W@R-34M-#`Y-BUB<V0N=FAD9BYO=70`K90[3\,P
+M$(#W_(J3V#I$?L==:%519B0DF$-PJ@[`PL#@'X\OB1M?G@C%=J)8=_?E'O8Q
+MU@X`)8"5$^]Y@3_E=/ILES4T@4!=@-*@#=B@SOI%-D3@7\\O>3I\A^-+5O.X
+M?#`B3JSAHL.RGL,=$IP,PCK19#RQJCA(U^_5!.X^/,<>IY:\"YE@;DHP&ZS>
+M*G>QMG9@E]89N`,N@=E.)BCP5E_H_=N/W1`DW`7_8!QNB;B"ZO,$)U;"!8I[
+M0QPGRGT)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W9W5Z=SBF.;-?[RY&+Y$EOUU7/V'<:#'WZ>?_'>B.?KGM?7WB[CO-GN
+M[ZS/W6[7-U']^E`]C\V[=6>[;IO.-U$]S\T1)JKWU>WJ>N/#N/DJUH/O7)]D
+G^\Y=TYUM&T&U=)9U^'_[]_X3UV]/V__6A,62\(O_`X=39<Z@70``
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-4096-ebr.raw.gz.uu b/usr.bin/mkimg/tests/img-63x255-4096-ebr.raw.gz.uu
new file mode 100644
index 0000000..a874b5b
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-4096-ebr.raw.gz.uu
@@ -0,0 +1,12 @@
+# $FreeBSD$
+begin 644 img-63x255-4096-ebr.raw.gz
+M'XL("`'&'50``VEM9RTV,W@R-34M-#`Y-BUE8G(N<F%W+F]U=`"ME,T.PB`,
+MQ^][BIX]+,"&P\N6F'CWHIYQ;D^QA[>,35MA'R;P%9+"+__24B%\`\`9'<N&
+M(?]I0W;(1II\_@WL^RC0XUJ\A0=P6#UM<!0]P;42BBZJKW%+37&OU.[V_P&U
+M!FL#X&W6IQ*'H^J<N50@;&1=-@SGG/<9:,:$T164&O01C-JK\'&Y1^)KA$SE
+ML,>I+=PLV&=0#-<07.&S[TN1Y!;-.[HGN-K/&5>NJ<.7$%W,L.BL3ILL!CN_
+M1^,,L@-9@#"337'@)[[PU7<*92CF[HH^"-VU#E?Q\Y+@U(:[P'%CH2+Q9"'<
+M>+TZ5-<F#H;\_1D[?ZZ#\)_K<2IM(3B-E04S$$^%Z[)AN.:\>V`Y`9.]H*M\
++0F1O]"SVO.4&````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhd.gz.uu b/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhd.gz.uu
new file mode 100644
index 0000000..c00d389
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhd.gz.uu
@@ -0,0 +1,18 @@
+# $FreeBSD$
+begin 644 img-63x255-4096-ebr.vhd.gz
+M'XL("`'&'50``VEM9RTV,W@R-34M-#`Y-BUE8G(N=FAD+F]U=`"ME\%NG#`0
+MAN_[%"/UE@,R@VW(92-%3<^1HK1G+X$HAS91MX<<>/AXL+W8@-EL,\`BK\;S
+M^1_/V,A"N`M`5Z![T!UH1>U:@KZ&N@&P1O_@^"[]7QC:US]=^^_EO?#7L'.P
+M4L1>J3OY8P72#E(#&AI$/U$;AH`IOMT]7[W\?@XX]+@PL-0@$92%R,4XC3BI
+M(]*/VX?O<W754MWDY<;I>ZCZJ$<5JRN*FQ@GK9?M3X^&7HXRPY/\20PQ+E&G
+MQ,PKDKDVJ5&P:SB]Y74)[FKG<^%*Q19&;=\"=`DU4MN639B'Q6-+Y?WX9OX>
+MNYD^S)2*CI(QM\E\N.A+!4-GKT"2P*UP8:0<Y[B54OG2[.G43_J&G02A@@''
+M\-/9FU`0Z].EV)CS?#*R^LQF7/\1\.%P,3"CT.':4\!&31&YM>K]VQ*J;E7?
+MN&SW,>Z).]S^,J!28,P"^!CTM<SI:!HRV[U3F)5WWC#<%NE]`HX%HVK:SI6&
+M!C^K\-?=SY7\-B:S'5P>L,/A.5P0'._V*>XFPE6N^B9*M#DE=1>W(]S>_0).
+M;JFC/:%;,V2#5<S%8IJ97YQG*#LH*Q"-MV$*/.47)GW72QF8A+NA#Y;A&L+5
+M:?\RPN&9<"'%'?QW-_1,4GAF]O9+=2US,@[SE?')E4N0=.4Z'/)N!&;<66P%
+MVE[+=]XPW!?I[8#H/T5LWS;TFRF;0NF!;`HML&-6:'B_']HK9#HH$([QH$`X
+BQH,"X1@/"H1C/"@0CO&@0#C6@X*V1T`A=A\#O(;Y70X`````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhdf.gz.uu b/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhdf.gz.uu
new file mode 100644
index 0000000..b2dd812
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhdf.gz.uu
@@ -0,0 +1,15 @@
+# $FreeBSD$
+begin 644 img-63x255-4096-ebr.vhdf.gz
+M'XL("`'&'50``VEM9RTV,W@R-34M-#`Y-BUE8G(N=FAD9BYO=70`K94[;\,@
+M$(#W_(J3NF6(``,FBR-%3>=*5=O9=7"4H>W2H8-_?,$8FS,XCPJ#$=;!YWMQ
+M$.(>`/,F^[*@V\R>;K5>]33Z<3>P;9-`AVO,+K/`]%H,$].+-L`U%`J=U&]G
+MARK$'7.;V]X'%`+J.@*^>OU8YG"4VHHY`U(GQF5!M]_@YH&J3QA1`A<@)"AV
+MJX;OA[=$?!6AN0QV.'8-YQ5V&93"[0)<X;)OHM!@5YAWX3S`5>[U.'Y).^,)
+MHE."16-%WF11IN%]89R!:J`%$#7(&`:.\85)OVVL!D/F7M`/8G-KBROQ>AK@
+MV!5S`>/Z0A7$$X7PBO>J6+LF<S#H_&3<>'(M!)]<AV-Y"\&VKRPF`\VJ>%P6
+M=,\;W!R0#\!L'E3#W28+D"U(#5+8><E!;J%4(9#A3.J:[R_=_)Q_PPA;'!VO
+MHKC;_:RPIT66P&K[$WFT\T"_A\-I??X\>9PO5?['7%JG"P/AD;D*F_NT?WF<
+M:U?$3E+(>W2Z.$?#D?=V(8Z/QFK=ET`Z=?2!!,E297&"S';]-[8.)S.GBKEW
+*5W]/U6F<$`D`````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-4096-ebr.vmdk.gz.uu b/usr.bin/mkimg/tests/img-63x255-4096-ebr.vmdk.gz.uu
new file mode 100644
index 0000000..92bef31
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-4096-ebr.vmdk.gz.uu
@@ -0,0 +1,84 @@
+# $FreeBSD$
+begin 644 img-63x255-4096-ebr.vmdk.gz
+M'XL("`+&'50``VEM9RTV,W@R-34M-#`Y-BUE8G(N=FUD:RYO=70`K5S1;N3&
+M$7SW5PSDMSPL6,LEN7PX.W'.`8(@@!$[]FO(Y3`68M\==$*0`_3QX9!3HR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1:EYO((9'6Y29R2*1UN8D<$FE=;B*'1%J7F\@A
+MD=;E)G)(I'6YB1P2:5UN(H=$6I>;R"&1UN4F<DBD=;F)'!)I76XBAT1:EYO(
+M(9'6Y29R2*1UN8D<$FE=;B*'1%J7F\@AD=;E)G)(I'6YB1P2:5UN(H=$6I>;
+MR"&1UN4F<DBD=;F)'!)<E]O((<%UN8T<$MY4#@EO*H>$-Y5#PIO*(>%-Y9#P
+MIG)(>%,Y)+RI'!+>5`X);RJ'A#>50\*;RB'A3>60\*9R2/199BB'1&\JAT1O
+M*H=$;RJ'1&\JAT1O*H=$;RJ'1&\JAT1O*H=$;RJ'1&\JAT1O*H=$;RJ'1&\J
+MAT1O*H=$;RJ'/&=99BB'/&>F<LCSRU]-?`SN9;&3W/""]C<#]OUF]RX(3][@
+M,+R:(EX,K[P7N!M<[E?S^SK\]97"==;E]K\-L"A<T[P`_"?S.W\VC=^>7S7^
+M[V+Z5;(O_]Z^\?3-:?Z'@-?Q<2ZJ\%MQB])=ST<S_.G;'Q<93G!F<M<);O=Q
+M3J1EOP7WM<#ET]/WC**_N%N?.[T6N*^F3\)=/I>=[I..%6O\F[:OV741I^<<
+MODT$]H[_*3O/`=/YNN?\ZI=IG&?E?B8_][+<\"U2?]>LGL=LJFZ4Z^9PXZ"2
+M\YP=X4[WOGJ9W<WX,+#\RCCXE1M`YE^Y$]S9=A#4XV291!HO_]Z^\?3=:?YG
+6`KQ$0+,.7L+O$<F^^#]5"_Y['F``````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-4096-gpt.raw.gz.uu b/usr.bin/mkimg/tests/img-63x255-4096-gpt.raw.gz.uu
new file mode 100644
index 0000000..d413df2
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-4096-gpt.raw.gz.uu
@@ -0,0 +1,15 @@
+# $FreeBSD$
+begin 644 img-63x255-4096-gpt.raw.gz
+M'XL("`+&'50``VEM9RTV,W@R-34M-#`Y-BUG<'0N<F%W+F]U=`"MEC]O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!)5PWW^RYKSPM[4[3:;*<
+M$T=W[+T2H88[^CLR'RYO_WIXNX#][O#?WX;U+7>>Q=-'^H54]8KY+N^G5+IU
+MHF&OV[S`Y=;5\]]7VM*L>DWXL#QUI%](5N^\5"]Q59NJ]]2I.\'QJO:K-5QK
+M6[UROFHLPI/'?Z=?N+P^K/\L@$4`-%MAX6\I:'=V>#C#L\/#&9X='L[T[/"`
+MAF>'AS,\.SR<X=GAX4S/CL+?,-+N(N[AL'QCKBLWUOX+Q&H9R<OQY?#S]+W"
+M_WRQ2G?F').7_F<NXD]OQF!X$?=PSU[$QR&9+'\>)&MX$?=PIA?QPM^],_OL
+)_ZT-&`6T90``
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-4096-mbr.raw.gz.uu b/usr.bin/mkimg/tests/img-63x255-4096-mbr.raw.gz.uu
new file mode 100644
index 0000000..7daee29
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-4096-mbr.raw.gz.uu
@@ -0,0 +1,12 @@
+# $FreeBSD$
+begin 644 img-63x255-4096-mbr.raw.gz
+M'XL("`/&'50``VEM9RTV,W@R-34M-#`Y-BUM8G(N<F%W+F]U=`"ME+V.PR`,
+MQ_<\A><."$AHZ))*E6Z_I>W,Y9*GR,/7Q*0Q)1^-!!B$9/CI;VR0DAI`I4&Z
+MA7G=,=Q$W(?B5(PT]7<,:"7T?0(4""1<BSC<@.9,6*"5/7CA.-!:!647UF0P
+MB+%=_=0(AOM_GTIMW1%P<YO#[8\!C0'G$N!]TJ<W91S75W>9\VO'@C$U5`;,
+M&:S^5N'SY_&AD'`J5\"$TWNX23!5T!+NRG`E5=],4>P4KSN^9KB&QH2KMM3A
+M3<ANR;$:K,E;+!9[?([G&50'J@1I@T_'P'=^8=9W267H*-P-?9"&ZSRNCO<K
+MAM,[X4*,\Q\5SV>4PIW;:U)U;>9DJ,^7\>7+]9#XY1).Y_T(+N//@A6(N])Y
+9W3'\BK@3L`K`;#?H?SXIBQ>7_'@>Y08`````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhd.gz.uu b/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhd.gz.uu
new file mode 100644
index 0000000..7b3c619
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhd.gz.uu
@@ -0,0 +1,18 @@
+# $FreeBSD$
+begin 644 img-63x255-4096-mbr.vhd.gz
+M'XL("`3&'50``VEM9RTV,W@R-34M-#`Y-BUM8G(N=FAD+F]U=`"METUOXR`0
+MAN_Y%2/MK0<+CP'32RI5FSU7JMJ>L6M'/>RVVNPA!__X,@9L\%>:+;9C$<$\
+MO,,,8\&8O0!D`;(%V8`4U"XYR%LH%8#I=`_V[]S]A:Y^_]/4_][.F;NZG87E
+M++2*S<D>"^!FDA)0TR3RE=K0>4SVXW"\>?M]]#AT.#\QE\`1A('PV3R*#>J(
+M].O^\>=473%7-UK9>=H6BC88483JLNPNQ'%C9<;3(Z'EO4S_1'^BCA`7J1-L
+M8A7(7%K4P-DEG-RRN@9WLW.QL*EB$J,T;P8RAQ*I;=+&K\/L,:ER/GWHOZ=F
+MH@]74D4&P9CV\75WT:4*^L%.`2>!6^Y"3SE-<0NI\JW5D[$==PVS"$SX#NS=
+MCU=O1$&H3^9L8\W7@[&J3Y,^L[>87GBO=W3W67P/P*JZ#JB851CC!H>K>G!8
+MB]$CNU?=^M4Y%,UB0/IMNP_6KWI-'-^JO0XH!&@]`SYY??6FC.OU*94XOJI/
+M&%%2.1<2%'Y5X<OA>6'_*KU2#OZO^BF-EW!><%CM8]Q=@"ML]HV4H#A%>1>V
+M`]S>_CR.;ZFCFM`L=:PZ*Q(GBU83NS#.D#>0%\"4Z\,8.,071GVW<QD8N;NA
+M#^;N:L*5\?@\P.$%=R'&5>Z[ZT=&(;RP>ONYNCIQ,*KISOCBSB5(O',M#M,6
+M`MU7%I.!9M3\O=[1/63Q;8'H/D7)OFWHBFDRA=P!DRDTP":Q0IWV^R&=PD0'
+J!<(E/"@0+N%!@7`)#PJ$2WA0(%S"@P+ADAX4I#D",K;[!%1JM8A=#@``
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhdf.gz.uu b/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhdf.gz.uu
new file mode 100644
index 0000000..8cbe404
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhdf.gz.uu
@@ -0,0 +1,15 @@
+# $FreeBSD$
+begin 644 img-63x255-4096-mbr.vhdf.gz
+M'XL("`3&'50``VEM9RTV,W@R-34M-#`Y-BUM8G(N=FAD9BYO=70`K96[;L,@
+M%(;W/,61NF6PN)LLB10UG2M5;6?7P5&&MDN'#G[X@O&%8WQ)*NQC"POX_)\+
+M0(B_``0#4DR\YSOJ8X;O>K/=-#3Z<1]0$ZBJ")A9H,>5%F<'6"MDV[#&*W#"
+M[6.MI,!-V_8&==9<!_?:9P'NW,^*;;ZCQ0W7X&YU'U!**(H(^-KI8XLR[M>7
+MF\3YU4W!R!R$!*E`LUL5OI_>1@H]CJ9RV./8&JX3["MH"G<(<-Q7WT"AP:RP
+M[L)V@-O[I\.))74V$L1,=<PZ*],6B[8WGA?F&:@!RH'HMH]A8)]?&/3M8AD,
+MN;N@#V)W"X?+\7@:X-B*NX!Q;J,*\XE2N!*]?:RN3)P,.EX9-ZY<!\$KU^-8
+MVHU@U^PLM@+MJ/@]WU$_9_CV0-$"DT50MV>;XJ`J4`:4=.U<@-I!KD,@PY54
+ME]]?IORY_H89=CC:'T6QN?F,N]6B<F"%^XDZNW:@[^%TV5X_+QVNVZJZ'POE
+M@BXM1$3N:NSNT_'E<:R.QT'2*'IT.#A[QU'T#B%.],X:TVR!=##T@3HFMRJ'
+8DV0TZ[^Y]3B5N%3LN;OY`[XTL3D0"0``
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-4096-mbr.vmdk.gz.uu b/usr.bin/mkimg/tests/img-63x255-4096-mbr.vmdk.gz.uu
new file mode 100644
index 0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img/tests/img-63x255-4096-pc98.raw.gz.uu b/usr.bin/mkimg/tests/img-63x255-4096-pc98.raw.gz.uu
new file mode 100644
index 0000000..7869940
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-4096-pc98.raw.gz.uu
@@ -0,0 +1,12 @@
+# $FreeBSD$
+begin 644 img-63x255-4096-pc98.raw.gz
+M'XL("`7&'50``VEM9RTV,W@R-34M-#`Y-BUP8SDX+G)A=RYO=70`K93-CH0@
+M#,?O/D7/>S"EPHH7)YED[W.9W;-K]"E\^`7!E8KXD0!(,(5?_FVAB*X!2`+L
+M=N:T87J6O$_%1S'3Q'@/J!1T,?!M@#..K+Y&0B_!K#8#QG$=S#"5F[;@A#'&
+M('\J:=C!>7=EYO@1'@JYK[`>,BO4LT)5@U2@/D'3584_7]\[*=&8+24.1V>X
+M17`UIG"/`%>Y:[921'"J%U`-_B=<![C6?0M.'JDSD<!ASY!T5N6]+-IT?B[,
+M,X@!1`6HO8TX\#^_L.IK8AG$W#W0![&[G<75?+\(<'3B+G#<K\4%^60I/(E>
+M&ZOK,R=#;%_&Q9=K(?SE.ASE+03-7%G,#;15/)K3ANE5\NZ`T@.S1=!6/L3B
+)#]P1(I+G!@``
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-4096-pc98.vhd.gz.uu b/usr.bin/mkimg/tests/img-63x255-4096-pc98.vhd.gz.uu
new file mode 100644
index 0000000..8582877
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-4096-pc98.vhd.gz.uu
@@ -0,0 +1,18 @@
+# $FreeBSD$
+begin 644 img-63x255-4096-pc98.vhd.gz
+M'XL("`7&'50``VEM9RTV,W@R-34M-#`Y-BUP8SDX+G9H9"YO=70`K9=-;^,@
+M$(;O^14C[:T'"X\!DTLK5=N>*U7MGHG7KGKH;M7LH0?_^#(&DL%?2;;$#L("
+M'M[Y`(00_@>@*]`=Z!:THGHM06^A-@"N,;PXE&7XA+[Y^Z=M_KU^%N'7;SRL
+M%'Q4.IS&8P7235(#6II$_Z8Z]!%3_+A[N7I]>XDX#+@XL=0@$92#R,D\1AS4
+M$>G^]O'G6%TU57<<Y>?I.J@ZUJ/BZHKBAN.D&^7ZTZNADX/,^"8?20/')>J4
+M&(UB,N><RHR=P^FU49?@KC8A%CY57&+4KA2@2ZB1ZBYMHA\FKTN5S_V[_=BW
+M(WVXD"J:!6/<)I?-Q9`J&#L'!9($KID+`V4_QLVDRK>\I]-Q,E2<$X2*#3B8
+MGWKOB`*N3Y=BQ>?+P5C49TF?6UO"SI3+#?UMD3X'X*Z[#*@4V"GP*1K<D+ZM
+MA$;.^9T;>=;J:!:R[[_CVV;V']I5(9<K-":S0C,H5#5MZ$J#P7,5_KI[G@F)
+ML=E"XG%X"A<%\_T^Q=TP7.73[$AAVQ,T)51M^.!UAKOV_XB3:^IH5VCG&A:-
+M59F3Q9K1.!YG*%LH*Q`FM&$*/,07COJV4QF8F+NB#Z;F6L+5:?^2X?"$N9#B
+M=N'DC3V3$)[PWO5479,Y&+OQRCASY1(D7;D>AWDW`COL+"X#:1>?E,L-_4.1
+M/AZ(X3#*=KIA.#VR*90!F$VA#.='1H6V64VV2[-0!X69K@J$RWA5(%S&JP+A
+?,EX5")?QJD"XC%<%PF6]*FAW"11B\P51KS:'7PX`````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-4096-pc98.vhdf.gz.uu b/usr.bin/mkimg/tests/img-63x255-4096-pc98.vhdf.gz.uu
new file mode 100644
index 0000000..bfbd1f1
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-4096-pc98.vhdf.gz.uu
@@ -0,0 +1,15 @@
+# $FreeBSD$
+begin 644 img-63x255-4096-pc98.vhdf.gz
+M'XL("`7&'50``VEM9RTV,W@R-34M-#`Y-BUP8SDX+G9H9&8N;W5T`*V5/6^#
+M,!"&]_R*D[IEB/R-61(I:CI7JMK.E)HH0]NE0P=^?'T8@@]#DE;&!AD=?GCO
+MSCXS%BX`)8!5,\]E0[O?T-:NUJN.QIN_`;6&*@4^>V"'$ZBO5%`K\*-)AZ89
+M.S&TF\DUX+@WIJ!^UJ)A!M>[JS+'3["+0OZNL'"9%=I.H2Y`:=`&K+A5X>OA
+M928EEF5+2<"):[A!L&R6<+L()\,R&RD\FE5SD*Y_B<<1;AON`:<NJ?.18&[.
+ML.BLSKM8K&]T7IQGX`ZX!&9[FZ#`<WYAU%>F,@1Q]X(^2-VM$%?0[WF$$U?<
+M!8I[0UR43Y+"*]';INKJS,G@TYUQX\Y%"-VY`2?R%H*RJRQ^!6(53Y[+AO9Q
+M0UL`JAZ8+8*V/]V,!-.`<6`TC@L%IH3"QD!!5U);?WVZ^OOT$V<8<7QRYL0=
+MYPN)N\44("K\B7G'<:3O[G!<GSZ.`VXH5<./E<&@:P]1B;N6NONP?[J?JI-I
+MD"R)'D>=<=GSCI/H[6*<.COK7%<"^=C)"S',EBK$:3:9]=_<!IS)O%3\P;OZ
+)!3S1^)L2"0``
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-4096-pc98.vmdk.gz.uu b/usr.bin/mkimg/tests/img-63x255-4096-pc98.vmdk.gz.uu
new file mode 100644
index 0000000..9036f37
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-4096-pc98.vmdk.gz.uu
@@ -0,0 +1,84 @@
+# $FreeBSD$
+begin 644 img-63x255-4096-pc98.vmdk.gz
+M'XL("`;&'50``VEM9RTV,W@R-34M-#`Y-BUP8SDX+G9M9&LN;W5T`*U<78_<
+MQA%\]Z\8G-_RL&`MOY8/<A)'#A`$`0S;L5]#+LGX$%L23H<@`O;'AT-.S16Y
+MI$C[^K0GL,7NVNZ>W;Y3=6&39/IR+FM<EKFL=7GA$KCAGZ:'2](78WAD\<;M
+M[V__\>.)7W\ZG6Y?3&#P41*"1.'$F#W/[;3X(MSY<U&S&\/CO`N7^JCF+C#`
+MG3=N;,(-_7#GM1!F5X^W6W\A<"X"N1E<OE+39K&?R^X/7X3F^?Q2G\-PO$7E
+MRM0533!=D8]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29R2'!=;B.'!-?E-G)(=*9R2'2F<DATIG)(=*9R2'2F
+M<DATIG)(=*9R2'2F<DATIG)(=*9R2'2F<DATIG)(=*9R2'2F<DCT26(HAT1O
+M*H=$;RJ'1&\JAT1O*H=$;RJ'1&\JAT1O*H=$;RJ'1&\JAT1O*H=$;RJ'1&\J
+MAT1O*H=$;RJ'1&\JASPG26(HASPGIG+(\_U'$Q^#NR]VDAMF8[G39Y?>_[U]
+MX_;U:?XG`J+_;8!Y[NI[P'^&@K/QTX2KS%VSM;KZ_N6Q5_`$9RS7S#+C_A7)
+M9Q/Y[1F6G7&&ES'#O/0?M)L7[G(^FN%/W_RXR'"",SN2"6[W'1)YT'X+[H\"
+METXOLQ<4_2SP*US*::S7`O?5]$VX['/9Z8KJ6+'&']Y]22Z+.#UG_Y/'$X+\
+M?]YY#AC/U[WD5]VG<9Z5^YG\W'VY_J>N?GRMGL=L4&^4Z^9P_J>NGN?L"'>Z
+M]]5]=E?CP\#RG7'PG>M!YN_<">YL.PBJ<;),NH_[O[=OW+X]S?],@%D`-.M@
+/YC^:)/GB_P?]NZ=Q8```
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.raw.gz.uu b/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.raw.gz.uu
new file mode 100644
index 0000000..941ae5b
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.raw.gz.uu
@@ -0,0 +1,11 @@
+# $FreeBSD$
+begin 644 img-63x255-4096-vtoc8.raw.gz
+M'XL("`;&'50``VEM9RTV,W@R-34M-#`Y-BUV=&]C."YR87<N;W5T`*V206[#
+M(!!%]S[%7W=A,8!MO*J45ME5JM0+U#9P@*PY?$AP0HRQXT0>T`AIYC_-%\-8
+M"$#6:#CJZG(E1R4@)00'A']I^);DPAU/QAS^OKGX*:_AB@`C7YSWCZK%@BN3
+M<,7'"%03':T#%5@+QK/`@&NCJGV*6YLOX+J][`9<OQ57^ZRA#8Q)</\/N&'G
+MSZ"970,*#_&&7;K9%;'9VDL6=@E'$?>9XJ)=GJ@XHCXS';+3Z3NN'R#%5+5J
+M]BN',[NN"MFM.-VA]WM"L,,RCJ\.\>JJ-%I=@97OZC)YN>!^R^D)P'X$[C4A
+.-4K5C!5GC7NA2P,%````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhd.gz.uu b/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhd.gz.uu
new file mode 100644
index 0000000..7c4a413
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhd.gz.uu
@@ -0,0 +1,18 @@
+# $FreeBSD$
+begin 644 img-63x255-4096-vtoc8.vhd.gz
+M'XL("`;&'50``VEM9RTV,W@R-34M-#`Y-BUV=&]C."YV:&0N;W5T`*V6S6[;
+M,`S'[WD*`KOU8,B4+-NG`NO6VX`!>X')MEP4P]:AW:&'//Q(6XXE?ZU9F0B.
+M#(D__2E1#)4:/P!6@^W!>K`%]TL#MH:R`J#!T'!XYN$5SNW3+]_^>7S-PN=\
+M&F&YBJU2<[9'#886*0$=+V([[L-YPF0?/C_<//Y\F'`8<-/"QH)!*`AB%NOD
+M4*F+.B;=?_SV::E.+]7%5ORCH>]!]]$,':O+LML89\B*YG.ST(\RIY:\)`,Q
+M+E%7J(55I'1K4R-GMW#VR.H:W,TIG,48*A08)3T5V!Q*Y#Z%S;0/JT:A\OKR
+MVSV_^(4^W`D5>]&7K\;:?7<QA`I.DX,"BN7FT%T8*#^6N%6HO'/W;&IGTDV*
+M7\89M#NJV'?7SKN'TZ91(]6J/#J,;/!7K7"H#JR.<#ON.G:7;BL%"">58KZV
+M&@$T];K-_;M_]IXN+NHOB3ZW$RS_?1RN2NS^<=DJ4#4GL=WC</5L5;__[CHG
+MY>Z(:]Z*HYRA.N@\>+_`?8]PK?!A-"MW_1#_:DB_5[O;3.[J>?)XKRBS[^"B
+MO'R[Q+7)58L;PFR_H0XVU7477-."T:G5H;-W6S@O&BI-_U9<YZ"A.,FA/\C*
+M[:&(:T,%0UX12U0HK5!WE>=A^BM7;N.Y/W#^FJ7?$6B"0C&7"2BKT`:@F$)+
+M1:2HPK*K4?24JZ!0J&YFG&#=S#C!NIEQ@G4SXP3K9L8)ULV,$ZV;"4BQ=_H+
+(%O'FLVP-````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhdf.gz.uu b/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhdf.gz.uu
new file mode 100644
index 0000000..d5ecd33
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhdf.gz.uu
@@ -0,0 +1,14 @@
+# $FreeBSD$
+begin 644 img-63x255-4096-vtoc8.vhdf.gz
+M'XL("`?&'50``VEM9RTV,W@R-34M-#`Y-BUV=&]C."YV:&1F+F]U=`"ME+UN
+MPR`4A?<\Q9&Z98C,C[$]1>I/MDJ5^@*U#409VDI5APY^^&*P8R#832-CA(C@
+M?)Q++C?+7`.X0$$A\KYSBIR!<S`*,#.3,%NBCN[PI=3]ZR-ESSO;NHV#$;-X
+MN7]0S2YTNZAUF^T`+`,=60:6R"ID-`ETN&I257_BEOPY7+U6N`[77(L39I20
+M"DI%N#</UZ[\9Y"+<!6(F[`;PB5CN&S:K'4_,CV'(Q-N'^.F<&FDHICT"7=(
+MNI-G7-."LU"U&.Q#"J=6316BK\7)&HW)$P+=SN/HHHG_IDHA2PO,S:XZ,<XO
+M="^[\'/`9@"NY9"40^43#$)#*%O\&`H.4:$H?2`-\@9=^_FAVN_3CW>#%M=7
+M/I.]R=[KJ:FEYI`"M.X/$;*?>_[NGH[;T_MQQ-$AJO%@4Z//I3E^$F48[L$4
+MYM@=BR_)5[DW:'PR'3X:__;V/HZ?@S4%2#?6YMB#'\%"*OLL+L\BU<UOP^+$
+/RJEB<F_S"YNC6FHN!P``
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vmdk.gz.uu b/usr.bin/mkimg/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U`IJ=4/U[HRR_^A][EZ;PS5\`````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-512-apm.raw.gz.uu b/usr.bin/mkimg/tests/img-63x255-512-apm.raw.gz.uu
new file mode 100644
index 0000000..b47d4c6
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-512-apm.raw.gz.uu
@@ -0,0 +1,12 @@
+# $FreeBSD$
+begin 644 img-63x255-512-apm.raw.gz
+M'XL("/7%'50``VEM9RTV,W@R-34M-3$R+6%P;2YR87<N;W5T`*V3S6K#,!"$
+M[WZ*Z;50(\DKJ3FFM+D50D//P=0.!-K4I(%>]/"5(HG(/PDN:+T(BV4_QK-K
+MQGP`)"$%F$T64G`PPN4^2)B7M]+&71G#%![&V8VNZ[AR$*:X]T#ARI*!FE%?
+ME0)YOV#6KT.@QSE]Q*&92_4!)6?I6W;=9SN!$[D^U^.JL3JY.[]S0`MH@EJ$
+M4^V@6E<.ZK9=?3SM3_OOPS;BR.)4XYKU?]1]U=VD.IEYMC1SMA27,@#[LT74
+M1[EWC\[C4,YX.PB;)"`K$$$T5KAT-7L?`5?'MGW:/#^\KS:I?T29]:D9_HG$
+M/_^3I/XAU:=R^Z=N^J<K:#VQFQ?_?G[](D9]N?U[#/ZQ>N*\7C#KLO]X(`5@
+/-H4D'+#X`^%)]I"G!0``
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-512-apm.vhd.gz.uu b/usr.bin/mkimg/tests/img-63x255-512-apm.vhd.gz.uu
new file mode 100644
index 0000000..68c3838
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-512-apm.vhd.gz.uu
@@ -0,0 +1,18 @@
+# $FreeBSD$
+begin 644 img-63x255-512-apm.vhd.gz
+M'XL("/;%'50``VEM9RTV,W@R-34M-3$R+6%P;2YV:&0N;W5T`*U66VO;,!1^
+MSZ\XT+="@Z['W=/86/,V*"M[;HTCE\#:AB:P/OC'5T>76HYES\WD"$5&/I\^
+M?><B,>8?`)2`+:`!U#2N%.`7J*X![&1HPO4\O$+7O#R;YKA[6X>G6WDPSE*K
+MH3G9"PG*+E*!J&D1W-(8N@BSOKAYO-P]/48X$>#BP@I!"=`61(W60?;!CI`V
+MW^]^.,B'GIT<L^NM_%_;@FR3+V1D]^#ZK^EFE;6RWU.K0&I',[;!RV""X/0Z
+M>2*<9B=6"<V<J,EF<W`X9_49N,M5\(4/%1L8E>VM=!PJ06,;-E&'4;.A\G;8
+MUZ\'<\)/3(0*?O#CHSDYO5T10D7$CP,#1>$\MUUP*,=3N$RH_)=Z.+1386!%
+M8#I."+?]H7H]%*3\D+,9S:>=,<FO)GXV-;6(R>Z:_->&;WX1##MU1SWAW;/U
+M:VC:9HC:YJ*B?^'#B>[V9S9<&N*G.(4Q17)#,;R$W[?]_H_)P(E2V_5P<LQ.
+MMR'G7-+Y$NUZ7[IU&]G=VVP[[HZ[E^?["$>%BDJM0US.[JG>9]GIPKXU"WT;
+MDT8$P*%O(?(SI6//.'<@"4\GI.[/(+&UQ#7-V?<1X.;5&'L*7?W>W*7Z&566
+M'V<+]!.)?CY)4OW2VL*G#O'S^<WJ1X=)E8G-7K_#7Q^(D5]I_430C]69?GJB
+MNUT/?QY0A&):K#J+OOJ58:@"8#&&JL_A4@PYSCKSLU[&P+#051>GJ\PY5UV"
+I*WC5Q5"R)JW\W]*K+H:25>BJ2W`%K[H$5_2JBZZ@KMX!;=,CGA\-````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-512-apm.vhdf.gz.uu b/usr.bin/mkimg/tests/img-63x255-512-apm.vhdf.gz.uu
new file mode 100644
index 0000000..6096dac
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-512-apm.vhdf.gz.uu
@@ -0,0 +1,15 @@
+# $FreeBSD$
+begin 644 img-63x255-512-apm.vhdf.gz
+M'XL("/;%'50``VEM9RTV,W@R-34M-3$R+6%P;2YV:&1F+F]U=`"M54UKPD`0
+MO?LK!GH3&I+=R<2>^D'U5I!*SQI,(H&JP0KM(3^^^ZF[211;=AV6#9-]OGEO
+M=Q+'>@!@"BF#6$1L@JOY_-P):*?OD1AQ9$<[TF#)M5V7X:+.:$=C#<AD.HT!
+MB]X^[@(F?J*=OW4!-9SDAPEDL0Q:`Z4W\7MNFL]R`(Z%*E?#\3Z[M%+K!"!C
+MD"'0@YFI`BIEVK!;-OGA6!_K_6YIX5#`42$W9W]AM\V;079I8&_Q1F_1+)@!
+M]+T%RP]#GSU4=I`47A@A`AFD'!"!%8)X*G/BN0<X.Y3ER^+U_F.V</5##,R/
+M;M"/.?KI2^+J!RX_"JT?7=4OXY!E`V?SK-_7MSZ(EE]H_29&OS@?F"\GVGGD
+M_S0@&L!@#,ET9^+FKDL1N>T!$Q>0G>U5@.O]KEP?ZQ_W!I/ISE4U''(_X_);
+M0!FP7+680JX=?G?3S;C>;BR<[7[VCX77)XN[59)?[DP8K"!79W:\+Q)UU!,\
+M>>45;MBMU/SH%HNG8LL*4-.TX3UX"0GWY)NAX53W<U_^K[<:C@(?%?&A'/T"
+(P78/5M('````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-512-apm.vmdk.gz.uu b/usr.bin/mkimg/tests/img-63x255-512-apm.vmdk.gz.uu
new file mode 100644
index 0000000..89cfd3e
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-512-apm.vmdk.gz.uu
@@ -0,0 +1,83 @@
+# $FreeBSD$
+begin 644 img-63x255-512-apm.vmdk.gz
+M'XL("/;%'50``VEM9RTV,W@R-34M-3$R+6%P;2YV;61K+F]U=`"MG%MOY,81
+MA=_]*PCYQ0B0`<_P_K!`[,@&@L#`PNLDCPZOL9#U2I"$)`O,CP^;[-,ZE,1M
+MPBIEY)G:J:KIKJ9*RE<'3-/U*TGR+LGS)!^2HDQ2)/,_K8\DS9Z,^7&N^<;E
+MK]<__OW$KV].I\M7:S*X*`E!JNG$V'S.Y?3LB^G.7XK:O#$_SM%TF8OJ7@3Z
+M=.>=-W;3Y?.;Y]="N+IV>7MP+R1=$A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T@>+>`8?Z25IX4+TFC:XK
+MW`RUGHP_)S=`Z.1..%GV(I#CS>+_0&^5[GF%>S"Z)J">@<4J6'^L)U9?N.5M
+%L04%````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-512-bsd.vhd.gz.uu b/usr.bin/mkimg/tests/img-63x255-512-bsd.vhd.gz.uu
new file mode 100644
index 0000000..2e7c657
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-512-bsd.vhd.gz.uu
@@ -0,0 +1,17 @@
+# $FreeBSD$
+begin 644 img-63x255-512-bsd.vhd.gz
+M'XL("/?%'50``VEM9RTV,W@R-34M-3$R+6)S9"YV:&0N;W5T`*V7/6_#(!"&
+M]_R*D[IEL/`98W=IHJCI7*E2.[O$CC+T0TV'#/[QY6R(#W\E;;$)PH)[>(\[
+M$!&B?0!4`JH"58)*J9U)4+>0Y0"FTQ9LZMA^0JT_WDO]?3A%]JD7+2P6W,HW
+M)WM,0)I),L"")E$[:D/M,-'-=K\\O.T=#BW.32P52(340.1@GER<U1'I8?-T
+MWU>7#-5U5NT\505)Q48D7%T4K3A.&BLSGHJ"2C8R7?$^O`Z.\]2EHF?%9(XM
+M*G-V#*?FK'Z#6RYL+-I4,8F1F5J`BB%#:INT<>LP*"953L?/XNM8]O3A1*HH
+M%HQ^GYQV%VVJH!ML%4@2..<N-)1C'S>2*O]:/>7;2=LPBR!2UX&-^_[J=2C@
+M^E0L9M9\.AB3^@K29_:6*$;JZ8YZ$_GO&:@)F&:TW5,%.5Z[@B_;Y['XZHET
+M^>/NT'@)YP3ST\#'K1@N:</145CR@HXA*;MO.8*[,[]UAY-SZBAGRK&.26?3
+MP,FL\YX=CS/$)<0)B)QE-0.>XPN=OMNA#/3<G=$'0W<+PF7^^)CA\(*[X.->
+M[;G,!G<AO+!ZZZ$Z'3@8N_[.N'+G$L3?N2T.PQX$V)PL)@/-J&$]W5$_1O[;
+M`M$>5<'./G1'52B%T@*#*33`,K!"+&>3[;=9J*S"0!=)P@6\2!(NX$62<`$O
+=DH0+>)$D7,"+).&"7B25^8L@Q.('-E=QRWT,````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-512-bsd.vhdf.gz.uu b/usr.bin/mkimg/tests/img-63x255-512-bsd.vhdf.gz.uu
new file mode 100644
index 0000000..c102a9f
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-512-bsd.vhdf.gz.uu
@@ -0,0 +1,14 @@
+# $FreeBSD$
+begin 644 img-63x255-512-bsd.vhdf.gz
+M'XL("/?%'50``VEM9RTV,W@R-34M-3$R+6)S9"YV:&1F+F]U=`"ME#M/PS`0
+M@/?\BI/8.D1^QUUH55%F)"280W"J#L#"P.`?CR^)&U^>",5VHEAW]^4>]C'6
+M#@`E@)43[WF!/^5T^FR7-32!0%V`TJ`-V*#.^D4V1.!?SR]Y.GR'XTM6\[A\
+M,").K.&BP[*>PQT2G`S".M%D/+&J.$C7[]4$[CX\QQZGEKP+F6!N2C`;K-XJ
+M=[&V=F"7UAFX`RZ!V4XF*/!67^C]VX_=$"3<!?]@'&Z)N(+J\P0G5L(%BGM#
+M'"?*?0E7LG<<>U=M7`PYO!E_O+D(H3>WQ8EM&X%H.DLX@4%K_)X7^*><SA:H
+M.N!F&;1=[S,23`W&@='X72@P>RAL"A3T)/GJZ]-5W]>?M,*(XVTSF%QH+R3>
+M%E.`*/$GYAV_$__NSI?=]>,2<;%5Q1\K@TG7`:)&X5H:[N/I^6'HG1PGR9+L
+M<?0S;7LA<)*]0XI3MV"=:UH@[Q?9$,%DJT*<9@.K_]:VQ9F-CTHX?-DO_`G/
+%>S`'````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-512-bsd.vmdk.gz.uu b/usr.bin/mkimg/tests/img-63x255-512-bsd.vmdk.gz.uu
new file mode 100644
index 0000000..79b142e
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-512-bsd.vmdk.gz.uu
@@ -0,0 +1,81 @@
+# $FreeBSD$
+begin 644 img-63x255-512-b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GF_2+B/-M>KY)OX@XWS;1+R+.MTWTBXCS;1/](N)\VT2_B#C?-M$O
+M(LZW3?2+B/-M$_TBXGS;1+^(.-\VT2\BSK=-](N(\VT3_2+B?-M$OX@XWS;1
+M+R+.MTWTBXCS;1/](N)\VT2_B#C?-M$O(LZW3?2+B/-M$_TBXGS;1+^(.-\V
+MT2\BSK=-](N(\VT3_2+B?-M$OX@XWS;1+R+.MTWTBXCS;1/](N)\VT2_",ZW
+M;?2+&$WUBQA-]8L83?6+&$WUBQA-]8L83?6+&$WUBQA-]8L83?6+&$WUBQA-
+M]8L83?6+&$WUBQA-]8L83?6+F++,4+^(R52_B,E4OXC)5+^(R52_B,E4OXC)
+M5+^(R52_B,E4OXC)5+^(R52_B,E4OXC)5+^(R52_B,E4OXC)5+]XSK+,4+]X
+MOODNX8/I;C>[Z@.+97WKMX/>_KW_Q/7KT_:_F'#Y@MVR]E]T6E:N.1]=X4_?
+M_/C*AHNSV8;7=#=?GOPR7>1=TUZZOT@ZW^`G\=Q\%W,/EX_/=O%*NC^?Y)NB
+MB^4+=G=7IW.*8YLU_O+D8OD26_75<_8=QH,??IY_\=Z(Y^N>U]?>+N.\V>[O
+MK,_=;M<W4?WZ4#V/S;MU9[MNF\XW43W/S1$FJO?5[>IZX\.X^2K6@^]<GV3[
+FSEW3G6T;0;5TEG7X?_OW_A/7;T_;_]:$Q9+PB_\#AU-ESJ!=````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-512-ebr.raw.gz.uu b/usr.bin/mkimg/tests/img-63x255-512-ebr.raw.gz.uu
new file mode 100644
index 0000000..ba30800
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-512-ebr.raw.gz.uu
@@ -0,0 +1,12 @@
+# $FreeBSD$
+begin 644 img-63x255-512-ebr.raw.gz
+M'XL("/C%'50``VEM9RTV,W@R-34M-3$R+65B<BYR87<N;W5T`*V4S0["(`S'
+M[WN*GCTLP(;#RY:8>/>BGG%N3[&'MXQ-6V$?)O`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'8WD+P;:O+"8#S:IX7!9T
+MSQO<')`/P&P>5,/=)@N0+4@-4MAYR4%NH50AD.%,ZIKO+]W\G'_#"%L<':^B
+MN-O]K+"G19;`:OL3>;3S0+^'PVE]_CQYG"]5_L=<6J<+`^&1N0J;^[1_>9QK
+M5\1.4LA[=+HX1\.1]W8ACH_&:MV70#IU]($$R5)E<8+,=OTWM@XG,Z>*N7=7
+)?T_5:9P0"0``
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-512-ebr.vmdk.gz.uu b/usr.bin/mkimg/tests/img-63x255-512-ebr.vmdk.gz.uu
new file mode 100644
index 0000000..869f19c
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-512-ebr.vmdk.gz.uu
@@ -0,0 +1,84 @@
+# $FreeBSD$
+begin 644 img-63x255-512-ebr.vmdk.gz
+M'XL("/G%'50``VEM9RTV,W@R-34M-3$R+65B<BYV;61K+F]U=`"M7-%NY,81
+M?/=7#.2W/"Q8RR6Y?#@[<<X!@B"`$3OV:\CE,!9BWQUT0I`#]/'AD%.C(D4>
+M::MUJP/[V%W;W4.U=-4%9=GTX=RE=9>+NW2N*%T&-_S3]')9_FP,KTNZ\?2W
+MMW__\<2//YY.3U],8`A1$H),X<28O<_3:?%!N//GHF8WAM=Y%RX/4>V+P`AW
+MWKBQ"3?TPYW70IA=,][NPH7`N03D9G#%2DV;Q7XNNS]\$9L7\LM##L/QEK6K
+M<E>VT71E,=JYJ\[CO<Q5@U,_`'[IWMY__(][ZS_>'NX_/+Z/^9W#V0[.ES+X
+ME[>`,!16E>$BW`AP=8`HO<L[ER/<=D\/?[G_Q9_^ZQ\^WK]_]P8L]QS.]I*[
+M2QW2"?[9\VMFA#?)7(GP'N[ISW]]^R8^N=GI0_-`N!`U)#*\]U"'XI:E"Y\O
+M7V-V_MUC0.SC1\HNG&UL3C&^]R5<%!=7U6Y,IPC8Y^%V%TL>>W=[\,VC_^'3
+M!__F[M?W[U+OPMF&EM4CT'5L5.Z*/$#%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__WK[Q],UI_H>`U_%Q+JKP6W&+TEW/1S/\Z=L?%QE.<&9RUPEN]W%.
+MI&6_!?>UP.73T_>,HK^X6Y\[O1:XKZ9/PET^EYWNDXX5:_R;MJ_9=1&GYQR^
+M303VCO\I.\\!T_FZY_SJEVF<9^5^)C_WLMSP+5)_UZR>QVRJ;I3KYG#CH)+S
+MG!WA3O>^>IG=S?@PL/S*./B5&T#F7[D3W-EV$-3C9)E$&B__WK[Q]-UI_F<"
+5O$1`LPY>PN\1R;[X/U4+_GL>8```
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-512-gpt.raw.gz.uu b/usr.bin/mkimg/tests/img-63x255-512-gpt.raw.gz.uu
new file mode 100644
index 0000000..2a259cb
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-512-gpt.raw.gz.uu
@@ -0,0 +1,15 @@
+# $FreeBSD$
+begin 644 img-63x255-512-gpt.raw.gz
+M'XL("/G%'50``VEM9RTV,W@R-34M-3$R+6=P="YR87<N;W5T`*V534_#,`R&
+M[_L5WA5$E*1)FIWXD$#B-A#<N/1C/:%)W,M_)VX:UG9Q89+3J*KD^JGM^*VE
+MC`O`:)!5YDX;^@<QO_K-U6:@J?HR8/@^AK``B@",N"88I<9W#@?HNG%+-7A%
+M9VE!J_0\XL1I;<4$UYZ\SC9MF.)$Q*5TN\N`UD)5G0'?4WQZ.`X+QH'9@0[O
+M2S`*K`9K?G%#KK:9QO?X]`S[^]<WA'V<TM4J&%4#1D)30MLMHE-DNG?+="-.
+MHY=95COA"A*WS>.*>+8T+K=IG%GSBCWTO[.-."OG7G[JY2UX#:Z!MB)QGS.<
+M8^X\@^;:0=F`.X!5T'3XT#I0*L079.('2*AO"W('I0)=([`_OHACA-V(K^LQ
+M/J/&CLAMVD!5S^BUCL"@_D@7YKB"NWH>JV?9JK<;FR6W:0-9O2I6+U\D4C)]
+MJEI22,+5S-5S:`[Z"/_O\SMMZ/=B?D6@&8%L$8;F<XSJ0!RC.A#'J`[$L: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#Y^@?EDGK(`($[OL1&@ZB)^!T
+M_EB=/>QU]?/5[)_D<T:D1MZ0BYX4>QE!3OU%+L2XNG3T6HJ>*A:]XYPLJ9$W
+M9*/7^>BE@T1.I4H7<7/4JA<QKB\</4UFK`]\?U]>\X;IKHI/#Y0SL)B'RMJA
+M8'40KF!U$*Y@=1"N:'40L&!U$*Y@=1"N8'40KFAU(-"P<DV<<"[W&K<!-?0F
+M=B/;CJ=E(Y9VN>#$7NO?:>+IS3`%FSCA=INX-5FQR[$16[")$ZYH$]?SY[?&
+MKS-77UK1O)'TL=:T(5"L.>.`PX^S&7Z=?H?1(QSW&9$<M%[4E)BZ`='10_1(
+M\\"_ES>/5Z?OCPM.S*J6!U-&8Q8C1%[(U;'<V^O/[QWR8?4N\9K2F^BAG[6-
+MA,_>/;CKVU"L?!)K+*!R)M<1_8@,R40FG$N5\.;_W5N/*YTJ^-?@\`>4./-P
+$LPT`````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-512-gpt.vmdk.gz.uu b/usr.bin/mkimg/tests/img-63x255-512-gpt.vmdk.gz.uu
new file mode 100644
index 0000000..ea3a546
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-512-gpt.vmdk.gz.uu
@@ -0,0 +1,88 @@
+# $FreeBSD$
+begin 644 img-63x255-512-gpt.vmdk.gz
+M'XL("/K%'50``VEM9RTV,W@R-34M-3$R+6=P="YV;61K+F]U=`"M7%UOW-81
+M?<^ON%4>$K3H@F?Y_6"@294`01'`C=WFI0]=?C5"'=F5A:(&]L>7E[SGZE!:
+MBG0T"NW=,6?.WIE+SBIG#I@D\X]S6>.RS&6=RPN7P(W_-!\N21^,\3A6/''^
+MR_6/?S_PY^O#X?S%#`8?)2%(%$Z,Q>><#X]^"'=\+FIQ8CR.FW"ICVJ>!`:X
+MX\J)5;AL/'F\%,+5G:;3G7\C<"X"N05<?B&GU62?6]WOOPC%\^M+_1K&[2UJ
+M5Z:N:(+IBGRR4U<>IW.)*T>G803\T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eBSD$
+begin 644 img-63x255-512-mbr.raw.gz
+M'XL("/K%'50``VEM9RTV,W@R-34M-3$R+6UB<BYR87<N;W5T`*V4O8[#(`S'
+M]SR%YPX(2&CHDDJ5;K^E[<SEDJ?(P]?$I#$E'XT$&(1D^.EO;)"2&D"E0;J%
+M>=TQW$3<A^)4C#3U=PQH)?1]`A0()%R+.-R`YDQ8H)4]>.$XT%H%91?69#"(
+ML5W]U`B&^W^?2FW=$7!SF\/MCP&-`><2X'W2IS=E'-=7=YGS:\>",354!LP9
+MK/Y6X?/G\:&0<"I7P(33>[A),%70$N[*<"55WTQ1[!2O.[YFN(;&A*NVU.%-
+MR&[)L1JLR5LL%GM\CN<95`>J!&F#3\?`=WYAUG=)9>@HW`U]D(;K/*Z.]RN&
+MTSOA0HSS'Q7/9Y3"G=MK4G5MYF2HSY?QY<OUD/CE$D[G_0@NX\^"%8B[TGG=
+8,?R*N!.P"L!L-^A_/BF+%Y?\>![E!@``
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-512-mbr.vhd.gz.uu b/usr.bin/mkimg/tests/img-63x255-512-mbr.vhd.gz.uu
new file mode 100644
index 0000000..53ce054
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-512-mbr.vhd.gz.uu
@@ -0,0 +1,18 @@
+# $FreeBSD$
+begin 644 img-63x255-512-mbr.vhd.gz
+M'XL("/K%'50``VEM9RTV,W@R-34M-3$R+6UB<BYV:&0N;W5T`*V736_C(!"&
+M[_D5(^VM!PN/`=-+*E6;/5>JVIZQ:T<][+;:["$'__@R!FSP5YHMMF,1P3R\
+MPPQCP9B]`&0!L@79@!34+CG(6R@5@.ET#_;OW/V%KG[_T]3_WLZ9N[J=A>4L
+MM(K-R1X+X&:2$E#3)/*5VM!Y3/;C<+QY^WWT.'0X/S&7P!&$@?#9/(H-ZHCT
+MZ_[QYU1=,5<W6MEYVA:*-AA1A.JR["[$<6-EQM,CH>6]3/]$?Z*.$!>I$VQB
+M%<A<6M3`V26<W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('(0$J4"S6Q6^G]Y&"CV.IG+8X]@:KA/L*V@*=PAPW%??0*'!K+#N
+MPG:`V_NGPXDE=382Q$QUS#HKTQ:+MC>>%^89J`'*@>BVCV%@GU\8].UB&0RY
+MNZ`/8G<+A\OQ>!K@V(J[@'%NHPKSB5*X$KU]K*Y,G`PZ7ADWKEP'P2O7XUC:
+MC6#7["RV`NVH^#W?43]G^/9`T0*315"W9YOBH"I0!I1T[5R`VD&N0R##E527
+MWU^F_+G^AAEV.-H?1;&Y^8R[U:)R8(7[B3J[=J#OX7397C\O':[;JKH?"^6"
+M+BU$1.YJ[.[3\>5QK(['0=(H>G0X.'O'4?0.(4[TSAK3;(%T,/2!.B:W*H>3
+79#3KO[GU.)6X5.RYN_D#OC2Q.1`)````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-512-mbr.vmdk.gz.uu b/usr.bin/mkimg/tests/img-63x255-512-mbr.vmdk.gz.uu
new file mode 100644
index 0000000..0c79f43
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-512-mbr.vmdk.gz.uu
@@ -0,0 +1,84 @@
+# $FreeBSD$
+begin 644 img-63x255-512-mbr.vmdk.gz
+M'XL("/O%'50``VEM9RTV,W@R-34M-3$R+6UB<BYV;61K+F]U=`"M7-%NY,81
+M?/=7#.2W/"Q8RR6Y?#@[<<X!@B"`$3OV:\CE,!9BWQUT0I`#]/'AD%.C(D4>
+M::MUJP/[V%W;W4.U=-4%9=GTX=RE=9>+NW2N*%T&-_S3]')9_FP,KTNZ\?2W
+MMW__\<2//YY.3U],8`A1$H),X<28O<_3:?%!N//GHF8WAM=Y%RX/4>V+P`AW
+MWKBQ"3?TPYW70IA=,][NPH7`N03D9G#%2DV;Q7XNNS]\$9L7\LM##L/QEK6K
+M<E>VT71E,=JYJ\[CO<Q5@U,_`'[IWMY__(][ZS_>'NX_/+Z/^9W#V0[.ES+X
+ME[>`,!16E>$BW`AP=8`HO<L[ER/<=D\/?[G_Q9_^ZQ\^WK]_]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<-ROQ07Y9"D\B5X;
+MJ^LS)T-L7\;%EVLA_.4Z'.4M!,U<6<P-M%4\FM.&Z57R[H#2`[-%T%8^Q.(/
+(W!$BDN<&````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-512-pc98.vhd.gz.uu b/usr.bin/mkimg/tests/img-63x255-512-pc98.vhd.gz.uu
new file mode 100644
index 0000000..f474436
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-512-pc98.vhd.gz.uu
@@ -0,0 +1,18 @@
+# $FreeBSD$
+begin 644 img-63x255-512-pc98.vhd.gz
+M'XL("/S%'50``VEM9RTV,W@R-34M-3$R+7!C.3@N=FAD+F]U=`"METUOXR`0
+MAN_Y%2/MK0<+CP&32RM5VYXK5>V>B=>N>NANU>RA!__X,@:2P5])ML0.P@(>
+MWOD`A!#^!Z`KT!WH%K2B>BU!;Z$V`*XQO#B49?B$OOG[IVW^O7X6X==O/*P4
+M?%0ZG,9C!=)-4@-:FD3_ICKT$5/\N'NY>GU[B3@,N#BQU"`1E(/(R3Q&'-01
+MZ?[V\>=87355=QSEY^DZJ#K6H^+JBN*&XZ0;Y?K3JZ&3@\SX)A])`\<EZI08
+MC6(RYYS*C)W#Z;51E^"N-B$6/E5<8M2N%*!+J)'J+FVB'R:O2Y7/_;O]V+<C
+M?;B0*IH%8]PFE\W%D"H8.P<%D@2NF0L#93_&S:3*M[RGTW$R5)P3A(H-.)B?
+M>N^(`JY/EV+%Y\O!6-1G29];6\+.E,L-_6V1/@?@KKL,J!38*?`I&MR0OJV$
+M1L[YG1MYUNIH%K+OO^/;9O8?VE4AERLT)K-",RA4-6WH2H/!<Q7^NGN>"8FQ
+MV4+B<7@*%P7S_3[%W3!<Y=/L2&';$S0E5&WXX'6&N_;_B)-KZFA7:.<:%HU5
+MF9/%FM$X'F<H6R@K$":T80H\Q!>.^K93&9B8NZ(/IN9:PM5I_Y+A\(2YD.)V
+MX>2-/9,0GO#>]51=DSD8N_'*.'/E$B1=N1Z'>3<".^PL+@-I%Y^4RPW]0Y$^
+M'HCA,,IVNF$X/;(IE`&83:$,YT=&A;993;9+LU`'A9FN"H3+>%4@7,:K`N$R
+>7A4(E_&J0+B,5P7"9;TJ:'<)%&+S!5&O-H=?#@``
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-512-pc98.vhdf.gz.uu b/usr.bin/mkimg/tests/img-63x255-512-pc98.vhdf.gz.uu
new file mode 100644
index 0000000..dce8fa3
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-512-pc98.vhdf.gz.uu
@@ -0,0 +1,15 @@
+# $FreeBSD$
+begin 644 img-63x255-512-pc98.vhdf.gz
+M'XL("/S%'50``VEM9RTV,W@R-34M-3$R+7!C.3@N=FAD9BYO=70`K94];X,P
+M$(;W_(J3NF6(_(U9$BEJ.E>JVLZ4FBA#VZ5#!WY\?1B"#T.25L8&&1U^>._.
+M/C,6+@`E@%4SSV5#N]_0UJ[6JX[&F[\!M88J!3Y[8(<3J*]44"OPHTF'IAD[
+M,;2;R37@N#>FH'[6HF$&U[NK,L=/L(M"_JZP<)D5VDZA+D!IT`:LN%7AZ^%E
+M)B6694M)P(EKN$&P;)9PNP@GPS(;*3R:57.0KG^)QQ%N&^X!IRZI\Y%@;LZP
+MZ*S.NUBL;W1>G&?@#K@$9GN;H,!S?F'45Z8R!''W@CY(W:T05]#O>8035]P%
+MBGM#7)1/DL(KT=NFZNK,R>#3G7'CSD4(W;D!)_(6@K*K+'X%8A5/GLN&]G%#
+M6P"J'I@M@K8_W8P$TX!Q8#2."P6FA,+&0$%74EM_?;KZ^_039QAQ?'+FQ!WG
+M"XF[Q10@*OR)><=QI._N<%R?/HX#;BA5PX^5P:!K#U&)NY:Z^[!_NI^JDVF0
+M+(D>1YUQV?..D^CM8IPZ.^M<5P+YV,D+,<R6*L1I-IGUW]P&G,F\5/S!N_H%
+(/-'XFQ()````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-512-pc98.vmdk.gz.uu b/usr.bin/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!_V[IW%@````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-512-vtoc8.raw.gz.uu b/usr.bin/mkimg/tests/img-63x255-512-vtoc8.raw.gz.uu
new file mode 100644
index 0000000..c949873
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-512-vtoc8.raw.gz.uu
@@ -0,0 +1,11 @@
+# $FreeBSD$
+begin 644 img-63x255-512-vtoc8.raw.gz
+M'XL("/W%'50``VEM9RTV,W@R-34M-3$R+79T;V,X+G)A=RYO=70`K9)!;L,@
+M$$7W/L5?=V$Q@&V\JI16V56JU`O4-G"`K#E\2'!"C+'C1![0"&GF/\T7PU@(
+M0-9H..KJ<B5')2`E!`>$?VGXEN3"'4_&'/Z^N?@IK^&*`"-?G/>/JL6"*Y-P
+MQ<<(5!,=K0,56`O&L\"`:Z.J?8I;FR_@NKWL!ER_%5?[K*$-C$EP_P^X8>?/
+MH)E=`PH/\89=NMD5L=G:2Q9V"4<1]YGBHEV>J#BB/C,=LM/I.ZX?(,54M6KV
+M*X<SNZX*V:TXW:'W>T*PPS*.KP[QZJHT6EV!E>_J,GFYX'[+Z0G`?@3N-2$U
+-2M6,%6>->Z%+`P4`````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhd.gz.uu b/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhd.gz.uu
new file mode 100644
index 0000000..523a1ae
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhd.gz.uu
@@ -0,0 +1,18 @@
+# $FreeBSD$
+begin 644 img-63x255-512-vtoc8.vhd.gz
+M'XL("/W%'50``VEM9RTV,W@R-34M-3$R+79T;V,X+G9H9"YO=70`K9;-;MLP
+M#,?O>0H"N_5@R)0LVZ<"Z];;@`%[@<FV7!3#UJ'=H8<\_$A;CB5_K5F9"(X,
+MB3_]*5$,E1H_`%:#[<%ZL`7W2P.VAK("H,'0<'CFX17.[=,OW_YY?,W"YWP:
+M8;F*K5)SMD<-AA8I`1TO8CONPWG"9!\^/]P\_GR8<!APT\+&@D$H"&(6Z^10
+MJ8LZ)MU__/9IJ4XOU<56_*.A[T'WT0P=J\NRVQAGR(KF<[/0CS*GEKPD`S$N
+M45>HA56D=&M3(V>W</;(ZAK<S2F<Q1@J%!@E/178'$KD/H7-M`^K1J'R^O+;
+M/;_XA3[<"15[T9>OQMI]=S&$"DZ3@P**Y>;071@H/Y:X5:B\<_=L:F?238I?
+MQAFT.ZK8=]?.NX?3IE$CU:H\.HQL\%>M<*@.K(YP.^XZ=I=N*P4()Y5BOK8:
+M`33UNLW]NW_VGBXNZB^)/K<3+/]]'*Y*[/YQV2I0-2>QW>-P]6Q5O__N.B?E
+M[HAKWHJCG*$ZZ#QXO\!]CW"M\&$T*W?]$/]J2+]7N]M,[NIY\GBO*+/OX**\
+M?+O$M<E5BQO";+^A#C;5=1=<TX+1J=6ALW=;."\:*DW_5ESGH*$XR:$_R,KM
+MH8AK0P5#7A%+5"BM4'>5YV'Z*U=NX[D_</Z:I=\1:()",9<)**O0!J"80DM%
+MI*C"LJM1])2KH%"H;F:<8-W,.,&ZF7&"=3/C!.MFQ@G6S8P3K9L)2+%W^@L6
+'\>:S;`T`````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhdf.gz.uu b/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhdf.gz.uu
new file mode 100644
index 0000000..d8c4d3d
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhdf.gz.uu
@@ -0,0 +1,14 @@
+# $FreeBSD$
+begin 644 img-63x255-512-vtoc8.vhdf.gz
+M'XL("/[%'50``VEM9RTV,W@R-34M-3$R+79T;V,X+G9H9&8N;W5T`*V4O6[#
+M(!2%]SS%D;IEB,R/L3U%ZD^V2I7Z`K4-1!G:2E6'#G[X8K!C(-A-(V.$B.!\
+MG$LN-\M<`[A`02'ROG.*G(%S,`HP,Y,P6Z*.[O"EU/WK(V7/.]NZC8,1LWBY
+M?U#-+G2[J'6;[0`L`QU9!I;(*F0T"72X:E)5?^*6_#E<O5:X#M=<BQ-FE)`*
+M2D6X-P_7KOQGD(MP%8B;L!O")6.X;-JL=3\R/8<C$VX?XZ9P::2BF/0)=TBZ
+MDV=<TX*S4+48[$,*IU9-%:*OQ<D:C<D3`MW.X^BBB?^F2B%+"\S-KCHQSB]T
+M+[OP<\!F`*[ED)1#Y1,,0D,H6_P8"@Y1H2A](`WR!EW[^:':[]./=X,6UU<^
+MD[W)WNNIJ:7FD`*T[@\1LI][_NZ>CMO3^W'$T2&J\6!3H\^E.7X291CNP13F
+MV!V++\E7N3=H?#(=/AK_]O8^CI^#-05(-];FV(,?P4(J^RPNSR+5S6_#XL3*
+.J6)R;_,+FZ-::BX'````
+`
+end
diff --git a/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vmdk.gz.uu b/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vmdk.gz.uu
new file mode 100644
index 0000000..d9340d1
--- /dev/null
+++ b/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vmdk.gz.uu
@@ -0,0 +1,83 @@
+# $FreeBSD$
+begin 644 img-63x255-512-vtoc8.vmdk.gz
+M'XL("/[%'50``VEM9RTV,W@R-34M-3$R+79T;V,X+G9M9&LN;W5T`*U<76_=
+MQA%]SZ\@[#X412%PR+DD[X-1-U$"%$6`(`[:U_!CV0A-;$,6BAK0C^\NN6=U
+MJ'OI9:-QJ$#C.W.T,^0]DL\<J"S7/T6A0Z%:Z%2<FJ*4PO_5>A5E_13X:TPO
+M//[]]OM_W-"?QZ]6,`E55"(EPU&P^3J/-\_^`*[Z4M7F!7]56;C:ORC#16&$
+MJW9>V(73,+MK)3A=7_@&RBE\0G!O$U"Q@3M=Z6FWV2^=[D]?Q>'YEZLZG,'?
+MWN9<M'71##$LFM,2UT5;+:^51>N39@_XNKB]^_3OXM9]&N_O/CY\B.>KPKWU
+MR=J$_&8,"+ZQM@F?A!<"W#E`-*ZHIZ*6\'+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WP3NZ:F=;Z)
+M75.QSK>Q:RK6^39V39U,[9HZF=HU=3*U:^ID:M=45Y:&=DUUIG9-=:9V376F
+M=DUUIG9-=:9V376F=DUUIG9-=:9V376F=DUUIG9-=:9V376F=DUUIG9-=:9V
+M376F=DV=R]+0KJFSJ5U39U.[ILZF=DV=3>V:.IO:-74VM6OJ;&K7U-G4KJFS
+MJ5U39U.[ILZF=DV=C>V:71E>U@:_L?<4?@_L:?F=L'7X[9]U^/W6UP"_NW?N
+MZW>W5?T]GZ^[^$W6+SY?MZF3+P-VRU*TVGU8NO+\5'7.PGWI?"M<;]7N"C<<
+MA5LW-Y,KG'L&]S/!63\L<M&N@\);_XYV!>V2X#0O;]9ZWH.3)[B_/(=[:O?Y
+MNZTJGNJOG*ZX>KHIP0UC^-78QZ?WS34X9_JHR'P4;NJ+P3\G4LSC/ESUQ4/\
+G_X]*OP"N_H#+_^^_X+]G;/];`34"FIU0_7NC++_Z'WN7IO#-7P``
+`
+end
diff --git a/usr.bin/mkimg/tests/mkimg.sh b/usr.bin/mkimg/tests/mkimg.sh
new file mode 100755
index 0000000..7c2221c
--- /dev/null
+++ b/usr.bin/mkimg/tests/mkimg.sh
@@ -0,0 +1,141 @@
+# $FreeBSD$
+
+mkimg_blksz_list="512 4096"
+mkimg_format_list="raw vhd vhdf vmdk"
+mkimg_geom_list="1x1 63x255"
+mkimg_scheme_list="apm bsd ebr gpt mbr pc98 vtoc8"
+
+bootcode()
+{
+ case $1 in
+ bsd|pc98) echo 8192 ;;
+ gpt|mbr) echo 512 ;;
+ *) echo 0 ;;
+ esac
+ return 0
+}
+
+mkcontents()
+{
+ local byte count name
+
+ byte=$1
+ count=$2
+
+ name=_tmp-$byte-$count.bin
+ jot -b $byte $(($count/2)) > $name
+ echo $name
+ return 0
+}
+
+makeimage()
+{
+ local blksz bootarg bootsz format geom nhds nsecs partarg pfx scheme
+
+ format=$1
+ scheme=$2
+ blksz=$3
+ geom=$4
+ pfx=$5
+ shift 5
+
+ nsecs=${geom%x*}
+ nhds=${geom#*x}
+
+ bootsz=`bootcode $scheme`
+ if test $bootsz -gt 0; then
+ bootarg="-b `mkcontents B $bootsz`"
+ else
+ bootarg=""
+ fi
+
+ partarg=""
+ for P in $*; do
+ partarg="$partarg -p $P"
+ done
+ if test -z "$partarg"; then
+ local swap ufs
+ swap="-p freebsd-swap::128K"
+ ufs="-p freebsd-ufs:=`mkcontents P 4194304`"
+ partarg="$ufs $swap"
+ fi
+
+ imagename=$pfx-$geom-$blksz-$scheme.$format
+
+ mkimg -y -f $format -o $imagename -s $scheme -P $blksz -H $nhds -T $nsecs \
+ $bootarg $partarg
+ echo $imagename
+ return 0
+}
+
+mkimg_test()
+{
+ local blksz format geom scheme
+
+ geom=$1
+ blksz=$2
+ scheme=$3
+ format=$4
+
+ case $scheme in
+ ebr|mbr|pc98)
+ bsd=`makeimage raw bsd $blksz $geom _tmp`
+ partinfo="freebsd:=$bsd"
+ ;;
+ *)
+ partinfo=""
+ ;;
+ esac
+ image=`makeimage $format $scheme $blksz $geom img $partinfo`
+ result=$image.out
+ hexdump -C $image > $result
+ baseline=`atf_get_srcdir`/$image
+ if test "x$mkimg_update_baseline" = "xyes"; then
+ echo '# $FreeBSD$' > $image.gz.uu
+ gzip -c $result | uuencode $image.gz >> $image.gz.uu
+ rm $image $result _tmp-*
+ else
+ atf_check -s exit:0 cmp -s $baseline $result
+ fi
+ return 0
+}
+
+atf_test_case rebase
+rebase_body()
+{
+ local nm
+
+ mkimg_update_baseline=yes
+ for nm in $mkimg_tests; do
+ ${nm}_body
+ done
+ return 0
+}
+
+atf_init_test_cases()
+{
+ local B F G S nm nr
+
+ nr=1
+ for G in $mkimg_geom_list; do
+ for B in $mkimg_blksz_list; do
+ for S in $mkimg_scheme_list; do
+ for F in $mkimg_format_list; do
+ nm="test_$nr"
+ # nm="$G_$B_$S_$F"
+ atf_test_case $nm
+ eval "${nm}_body() { mkimg_test $G $B $S $F; }"
+ mkimg_tests="${mkimg_tests} ${nm}"
+ atf_add_test_case $nm
+ nr=$((nr+1))
+ done
+ done
+ done
+ done
+
+ # XXX hack to make updating the baseline easier
+ if test "${__RUNNING_INSIDE_ATF_RUN}" != "internal-yes-value"; then
+ atf_add_test_case rebase
+ fi
+}
+
OpenPOWER on IntegriCloud