Add zlib regression test

A zlib regression test has been added to verify the correct behavior
of z_compress_level() and z_uncompress.  The test case simply takes
a 128k buffer, it compresses the buffer, it them uncompresses the
buffer, and finally it compares the buffers after the transform.
If the buffers match then everything is fine and no data was lost.
It performs this test for all 9 zlib compression levels.
This commit is contained in:
Brian Behlendorf
2011-02-25 15:48:18 -08:00
parent 5c1967ebe2
commit 19c1eb829d
6 changed files with 172 additions and 0 deletions
+2
View File
@@ -62,6 +62,8 @@ if [ ! -f ${spl_module} ] || [ ! -f ${splat_module} ]; then
die "Source tree must be built, run 'make'"
fi
/sbin/modprobe zlib_deflate &>/dev/null
spl_module_params="spl_debug_mask=0xffffffff spl_debug_subsys=0xffffffff"
echo "Loading ${spl_module}"
/sbin/insmod ${spl_module} ${spl_module_params} || die "Failed to load ${spl_module}"