Commit Graph

9 Commits

Author SHA1 Message Date
Brian Behlendorf a6644f49a5 Add cleanup option -c to zconfig.sh
Several folks have now remarked that when the regression tests
fail they leave a mess behind.  This was done intentionally at
the time to facilitate debugging the wreckage.

However, this also means that you may need to do some manual
cleanup such as removing the loopback devices before re-running
the tests.  To simplify this proceedure I've added the '-c'
option to zconfig.sh which will attempt to cleanup the mess
from a previous test before starting.

This is somewhat dangerous because it must guess as to which
loopback devices you were using.  But this risk is fairly minimal
because devices which are currently still is use can not be
cleaned up.  And because only devices with 'zpool' in the name
are considered for removal.  That said if your running parallel
copies of say zconfig.sh this may cause you some trouble.
2010-08-05 11:24:04 -07:00
Brian Behlendorf 019953e0b7 Update zconfig to check partitions
Update the zconfig.sh test script to verify not only that volumes,
snapshots, and clones are created and removed properly.  But also
verify that the partition information for each of these types of
devices is properly enumerated by the kernel.

Tests 4 and 5 now also create two partitions on the original volume
and these partitions are expected to also exist on the snapshot and
the clone.  Correctness is verified after import/export, module
load/unload, dataset creation, and pool destruction.

Additionally, the code to create a partition table was refactored
in to a small helper function to simplify the test cases.  And
finally all of the function variables were flagged 'local' to ensure
their scope is limited.  This should have been done a while ago.
2010-08-05 11:22:33 -07:00
Brian Behlendorf 858985a46e Update zconfig.sh
This change updates zconfig.sh to reference /dev/zvol/ instead
of simply /dev/.  It also extends the texts to verify correct
minor device creation for import/export and module load/unload.
2010-08-02 13:15:00 -07:00
Brian Behlendorf 26e61dd074 Generate common.sh with paths from configure
The common.sh script assumed that it was either being run from
in-tree or was installed under /usr/libexec/zfs.  If this was
not the case, because of say the default --prefix=/usr/local,
then the paths would be wrong.  To fix this common.sh is now
generated from common.sh.in with the correct path information
provided at configure time.
2010-07-28 16:30:45 -07:00
Brian Behlendorf d28ada9eaa Remove explicit import from zconfig test 1.
Due to now resolved bug in the SPL you would need to explicitly
import you zpools after module load.  Now that is no longer the case.
If a cache file is found your pool will be automatically loaded and
available so I'm removing the explicit imports from the test case.
2010-05-18 16:15:57 -07:00
Ricardo M. Correia 4853ac3d53 Fix scripts to work when invoked from other directories. 2010-03-09 14:50:15 -08:00
Brian Behlendorf 6fabeffd3b Additional ZVOL compatibility autoconf checks and zconfig ZVOL sanity test. 2009-11-20 10:04:56 -08:00
Brian Behlendorf 5d4c60fabe Use alternate /etc/zfs/zpool.cache file for in-tree tests
Pass an alternate location via module option for the zpool.cache file
used by the kernel.  This allows us to write in-tree tests which do
not modify any out-of-tree files we do not own.  This is just standard
good behavior for any test suite.

Additionally, refine the existing test case to explicity use the cache
file when looking for pools to import.  And add a second test cache
which is forced to probe the disks for available pools to import.
2009-10-06 12:12:05 -07:00
Brian Behlendorf 0efea24e73 Add zconfig.sg test script.
This is an initial script for validation of zfs/zpool configuration.
For now there is only one test here to ensure that /etc/zfs/zpool.cache
is being updated properly from the kernel module.  Additional tests
should be added, I believe Richardo said there was an existing test
suite out there which validated the behavior of many zpool/zfs commands.
It would be nice to add that as appropriate.
2009-10-01 16:55:34 -07:00