Commit Graph

218 Commits

Author SHA1 Message Date
Brian Behlendorf 299cc480da Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-08-10 11:05:54 -07:00
Brian Behlendorf 8023513a30 Add zvol snapshot and clone tests
Add two additional basic sanity tests to confirm zvol snapshots
and clones work.  The snapshot test is basically the same as the
example provided in the wiki.  The clone test goes one step father
and clones the snapshot then modifies it to match the original
modified volume.  It them compares them to ensure everything was
modified as expected.

These are just meant to be sanity tests to catch obvious breakage
before tagging a release.  They are still not a substitute for a
full regression test suite.
2010-08-10 10:59:58 -07:00
Brian Behlendorf 9cb44812a4 Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-08-09 16:51:06 -07:00
Brian Behlendorf d5168aa089 Insert small delay for udev
While the zfs utilities do block until the expected device appears
they can only do this for full devices, not partitions.  This means
that once as device appears it still may take a little bit of time
before the kernel rescans the partition table, updates sysfs, udev
is notified and the partition devices are created.  The test case
itself could block briefly waiting for the partition beause it knows
what to expect.  But for now the simpler thing to do is just delay.
2010-08-09 16:43:54 -07:00
Brian Behlendorf 6478a7f847 Remove /zvol/ path component from zconfig.sh
See previous commit for details.  But the gist is with the removal of
the zvol path component the regression tests must be updated to use
the correct path name.
2010-08-09 16:43:33 -07:00
Brian Behlendorf ad06a3ace5 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2010-08-05 11:31:48 -07:00
Brian Behlendorf f6233da863 Add cleanup option -c to zpios-sanity.sh
See commit a6644f49a5 for full
details of cleanup option.
2010-08-05 11:25:36 -07:00
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 c53e5d229c Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2010-08-02 13:22:47 -07:00
Brian Behlendorf 5545adeadf Use sparse files for loopback+file configurations
Using sparse files for the test configurations had atleast three
significant advantages.

1) Actually test sparse files to ensure they work.
2) Drastically reduce required disk space for the regression test
   suite.  This turns out to be fairly important when running the
   test suite in a virtualized environment.
3) Significantly speed of the test suite.  Run time of zconfig.sh
   dropped from 2m:56s to 1m:00s on my test system, zpios-sanity.sh
   nows runs in only 0m:26s.
2010-08-02 13:16:41 -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 7611c3a368 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2010-07-28 16:53:11 -07:00
Brian Behlendorf 1510a95acd Add splat module to zfs.sh script
The splat module is only needed for the spl regression tests.
But if we add it to MODULES then 'zfs.sh -u' will be able to
unload it if needed,  The downside if 'zfs.sh' will always
load it but it's overhead is minimal and in a production
setting you'll always be doing a 'modprobe zfs' anyway so
this is really just for testing.
2010-07-28 16:47:30 -07:00
Brian Behlendorf 1ae7c424cf Generate common.sh with paths from configure
These are the zpios related changes which were part of common.sh.
2010-07-28 16:42:16 -07:00
Brian Behlendorf cdd1bba311 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios
Conflicts:

	scripts/common.sh.in
2010-07-28 16:39:33 -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 df51ecbf9b Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2010-07-17 16:05:01 -07:00
Ned Bass 84f737b448 Only try to unload modules whose use count is 0
This avoids errors from zfs.sh -u when, for example, zlib_deflate is in
use by btrfs.
2010-07-17 16:00:54 -07:00
Brian Behlendorf 804b4e0210 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2010-05-28 21:42:29 -07:00
Brian Behlendorf 812761eac5 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch
Conflicts:
	cmd/ztest/ztest.c
2010-05-28 15:46:10 -07:00
Brian Behlendorf 428870ff73 Update core ZFS code from build 121 to build 141. 2010-05-28 13:45:14 -07:00
Brian Behlendorf e26975dea8 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2010-05-23 10:05:25 -07:00
Brian Behlendorf fd6bf51a0a Use more correct /usr/bin/awk patch for default. 2010-05-23 09:57:05 -07:00
Brian Behlendorf ad78a7f826 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2010-05-18 16:23:41 -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
Brian Behlendorf cf07f0acd5 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2010-05-18 15:12:33 -07:00
Brian Behlendorf 3a8dbc184a Move zpios script change to correct linux-zpios branch. 2010-05-18 15:06:37 -07:00
Brian Behlendorf 4e7fd8ff9d Move build system and core script changes to correct zfs-branch. 2010-05-18 15:05:44 -07:00
Brian Behlendorf 9dc83e5f34 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2010-04-29 12:06:04 -07:00
Brian Behlendorf 66ba722b0a Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-04-29 12:04:36 -07:00
Brian Behlendorf 3affbe6d7e Update nvpair's to include nv_alloc_fixed support 2010-04-29 11:59:41 -07:00
Brian Behlendorf 50cf137f41 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2010-04-29 10:43:27 -07:00
Brian Behlendorf 1368594e11 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-04-29 10:41:59 -07:00
Brian Behlendorf fa42225a3d Add Solaris FMA style support 2010-04-29 10:37:15 -07:00
Brian Behlendorf eb7888a1eb Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2010-03-11 14:09:58 -08:00
Brian Behlendorf feee765f99 Remove promise example config replace with a supermicro config
The promise config never worked quite right.  I'm replacing it with
a Supermicro config which does and which I've tested on a real test
system.
2010-03-11 14:04:12 -08:00
Brian Behlendorf e7b3766a69 Remove udev dependency when running in-tree
After much contemplation I can't see a clean way to use udev entirely
in-tree for testing.  This patch removed a horrible horrible hack which
would copy the needed udev bits in to place on your system to make it
work.  That however is simply not acceptable, nothing you in in-tree
should ever ever ever install something on your system.

Since I could not come up with a clean way to use udev in-tree.  The
fix is to simply parse the zdev config file and create the needed
symlinks in a sub-diretory or your working tree.  This is not as clean
as using udev but it does work perfectly well for in-tree testing.
2010-03-11 13:56:20 -08:00
Brian Behlendorf 414f1f975e Rename update-zfs.sh -> zfs-update.sh for consistency 2010-03-11 09:53:59 -08:00
Brian Behlendorf 037d965f04 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2010-03-09 14:56:01 -08:00
Ricardo M. Correia 17c7323211 Fix scripts to work when invoked from other directories. 2010-03-09 14:51:49 -08:00
Ricardo M. Correia 4853ac3d53 Fix scripts to work when invoked from other directories. 2010-03-09 14:50:15 -08:00
Brian Behlendorf 06d354b4f3 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios
Conflicts:

	cmd/Makefile.am
2010-03-02 10:06:26 -08:00
Brian Behlendorf 7df02c0f57 Split the udev rule from a specific configuration
While I completely agree the udev is the lesser of many possibles
evils when solving the device issue... it is still evil.  After
attempting to craft a single rule which will work for various
versions of udev in various distros.  I've come to the conclusion
the only maintainable way to solve this issue is to split the rule
from any particular configuration.

This commit provides a generic 60-zpool.rules file which use a
small helper util 'zpool_id' to parse a configuration file by
default located in /etc/zfs/zdev.conf.  The helper script maps
a by-path udev name to a more friendly name of <channel><rank>
for large configurations.

As part of this change all of the support scripts why rely on
this udev naming convention have been updated as needed.  Example
zdev.conf files have also been added for 3 different systems by
you will always need to add one for your exact hardware.

Finally, included in these changes are the proper tweaks to the
build system to ensure everything still get's packaged properly
in the rpms and can run in or out of tree.
2010-03-01 16:51:21 -08:00
Brian Behlendorf 0e63df30fe Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2010-01-08 10:26:22 -08:00
Brian Behlendorf e0aff96a14 Use udevadm if available otherwise use udevtrigger/udevsettle
Moving forward udevadm {trigger/settle} replaced udevtrigger/udevsettle
as the correct interface to use.  However, since we need to work in
both environments for testing check and see if udevadm is available.
If it is then use it.  If it is not fall back to the legacy interface.
2010-01-08 10:20:03 -08:00
Brian Behlendorf 4fdebcdb85 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2009-12-11 16:23:43 -08:00
Brian Behlendorf 77825f6f77 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2009-12-11 16:22:24 -08:00
Brian Behlendorf 058ac9ba78 Pull in latest man pages as part of update-zfs.sh
The script has been updated to download the latest documentations
packages for Solaris and extract the needed ZFS man pages.  These
will still need a little markup to handle changes between the
Solaris and Linux versions of ZFS.  Howver, they should be pretty
minor I've tried hard to keep the interface the same.

In additional to the script update the zdb, zfs, and zpool man
pages have been added to the repo.
2009-12-11 16:15:33 -08:00
Brian Behlendorf ffa4167a7b Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2009-11-24 15:52:23 -08:00