Browse files

Add compatibility test script

Verify that an assortment of known good reference pools can be imported
using different versions of the ZoL code.

By default references pools for the major ZFS implementation will be
checked against the most recent ZoL tags and the master development branch.
Alternate tags or branches may be verified with the '-s <src-tag> option.
Passing the keyword "installed" will instruct the script to test whatever
version is installed.

Preferentially a reference pool is used for all tests.  However, if one
does not exist and the pool-tag matches one of the src-tags then a new
reference pool will be created using binaries from that source build.
This is particularly useful when you need to test your changes before
opening a pull request.

New reference pools may be added by placing a bzip2 compressed tarball
of the pool in the scripts/zpool-example directory and then passing
the -p <pool-tag> option.  To increase the test coverage reference pools
should be collected for all the major ZFS implementations.  Having these
pools easily available is also helpful to the developers.

Care should be taken to run these tests with a kernel supported by all
the listed tags.  Otherwise build failure will cause false positives.


The following example will verify the zfs-0.6.2 tag, the master branch,
and the installed zfs version can correctly import the listed pools.
Note there is no reference pool available for master and installed but
because binaries are available one is automatically constructed.  The
working directory is also preserved between runs (-k) preventing the
need to rebuild from source for multiple runs. -k -f /var/tmp/zimport \
     -s "zfs-0.6.1 zfs-0.6.2 master installed" \
     -p "all master installed"

--------------------- ZFS on Linux Source Versions --------------
                zfs-0.6.1       zfs-0.6.2       master          0.6.2-180
Clone SPL       Skip		Skip		Skip		Skip
Clone ZFS       Skip		Skip		Skip		Skip
Build SPL       Skip		Skip		Skip		Skip
Build ZFS       Skip		Skip		Skip		Skip
zevo-1.1.1      Pass		Pass		Pass		Pass
zol-0.6.1       Pass		Pass		Pass		Pass
zol-0.6.2-173   Fail		Fail		Pass		Pass
zol-0.6.2       Pass		Pass		Pass		Pass
master          Fail		Fail		Pass		Pass
installed       Pass		Pass		Pass		Pass

Signed-off-by: Brian Behlendorf <>
Signed-off-by: Tim Chase <>
Signed-off-by: Richard Yao <>
Issue #2094
  • Loading branch information...
1 parent 98fad86 commit a16bc6bdd9613c38cc9ceb6041e733b77435d476 @behlendorf behlendorf committed Feb 5, 2014
Showing with 501 additions and 0 deletions.
  1. +3 −0 .gitmodules
  2. +2 −0 scripts/
  3. +1 −0 scripts/zfs-images
  4. +495 −0 scripts/
@@ -0,0 +1,3 @@
+[submodule "scripts/zfs-images"]
+ path = scripts/zfs-images
+ url =
@@ -7,6 +7,7 @@ dist_pkgdata_SCRIPTS = \
$(top_builddir)/scripts/ \
$(top_srcdir)/scripts/ \
$(top_srcdir)/scripts/ \
+ $(top_srcdir)/scripts/ \
$(top_srcdir)/scripts/ \
$(top_srcdir)/scripts/ \
$(top_srcdir)/scripts/ \
@@ -17,6 +18,7 @@ dist_pkgdata_SCRIPTS = \
Submodule zfs-images added at 333160
Oops, something went wrong.

0 comments on commit a16bc6b

Please sign in to comment.