Commit Graph

102 Commits

Author SHA1 Message Date
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 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 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
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 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 fd6bf51a0a Use more correct /usr/bin/awk patch for default. 2010-05-23 09:57:05 -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 4e7fd8ff9d Move build system and core script changes to correct zfs-branch. 2010-05-18 15:05:44 -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 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 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
Ricardo M. Correia 4853ac3d53 Fix scripts to work when invoked from other directories. 2010-03-09 14:50:15 -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 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 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 0ec3a0ef62 Add udev rules to zfs-test package 2009-11-24 15:48:16 -08:00
Brian Behlendorf 23304dc828 Add 16 drive promise JBOD zpool configs for small test setup. 2009-11-20 10:12:41 -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 d00a0ea8a0 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2009-11-15 16:27:02 -08:00
Brian Behlendorf 0aa61e8427 Remove zvol.c when updating in update-zfs.sh Linux version available. 2009-11-15 16:20:01 -08:00
Brian Behlendorf 31a5ad7c9d Add missing zconfig.sh test script to package. 2009-11-02 14:09:23 -08:00
Brian Behlendorf 2d70e6fd91 Update scripts to cleanup better when setup failures occur 2009-10-27 14:31:31 -07:00
Brian Behlendorf 5fbb2c1c4e Test configs for md, dm, and ramdisk style block devices
For the sake of completeness we need to validate everything works
well not just on IDE or SCSI drives.  But we need to verify a
zpool configured on top of the Linux virtual block devices.
These scripts simply that testing process, and have shown that
while everything is good on top of a ram disk.  Right now the
code base panics the kernel when layered on top of either an
md or dm style device.  For the moment don't do that.
2009-10-26 10:41:06 -07:00
Brian Behlendorf 5bf14d3400 Update zpool-configs to be udev aware.
To simplify creation and management of test configurations the
dragon and x4550 configureis have been integrated with udev.  Our
current best guess as to how we'll actually manage the disks in
these systems is with a udev mapping scheme.  The current leading
scheme is to map each drive to a simpe <CHANNEL><RANK> id.  In
this mapping each CHANNEL is represented by the letters a-z, and
the RANK is represented by the numbers 1-n.  A CHANNEL should
identify a group of RANKS which are all attached to a single
controller, each RANK represents a disk.  This provides a nice
mechanism to locate a specific drive given a known hardware
configuration.  Various hardware vendors use a similar scheme.

A nice side effect of these changes is it allowed me to make
the raid0/raid10/raidz/raidz2 setup functions generic.  This
makes adding new test configs easy, you just need to create
a udev rules file for your test config which conforms to the
naming scheme.
2009-10-21 11:38:51 -07:00
Brian Behlendorf e0e0f0ea84 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2009-10-09 15:43:33 -07:00
Brian Behlendorf 5c36312909 Script update-zfs.sh updated to include libefi library 2009-10-09 15:37:29 -07: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
Brian Behlendorf 5b4a08d0f4 Move ZPIOS chunk to linux-zpios topic branch 2009-08-18 14:06:05 -07:00
Brian Behlendorf adc7bb76f2 Add 3 dragon drawer test configurations (raid0, raidz, raidz2).
The current test rig consists of two 60 disk dragon drawers in configured
in 4-x15 mode.  Each drawer has 4 SAS connections to my node for a total
of 8 SAS connections spread over 4 dual-port LSI SAS adapters.  The
configures are as follows:
- raid0:  All 120 drives in a single pool.
- raidz:  15 RAIDZ groups of 7+1.
- raidz2: 15 RAIDZ2 groups of 6+2.
2009-08-18 10:40:30 -07:00
Brian Behlendorf 4f555da51d Add zfs-test package which includes test infrastructure.
This change extends the existing in-tree test infrastructure such
that it can also be run as part of a the installed package.  This
simplifies testing on multiple systems and is generally all around
useful.  The scripts may still be run in-tree and will use the
in-tree build products as long as .script-config exists.
2009-08-17 21:35:06 -07:00
Brian Behlendorf 3a431c68c2 Remove LINUXINCLUDE from autoconf wrapper, breaks 2.6.28+ kernels.
Modern kernel build systems at least post 2.6.16 will set this properly
so we should not.  In fact post 2.6.28 the include headers have moved
under arch so the guess we make here is completely wrong.  Letting
the kernel build system set this ensure it will be correct.  Also
drop the ulimit from the Makefile which, not surprisingly, turns out
to be very non-portable.  If your expecting failures set the ulimit
in your shell before kicking off the test suite.
2009-07-27 10:39:28 -07:00
Brian Behlendorf 5ecd180d91 ulimit is a function of the shell and should be invoked as such. 2009-07-24 15:50:57 -07:00
Ricardo M. Correia 08d148d418 Add ulimit -c unlimited before running ztest, to get a core dump.
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2009-07-24 10:58:55 -07:00
Brian Behlendorf 710c21f2e9 Use LOSETUP variable for all calls to /sbin/losetup 2009-07-24 10:25:01 -07:00
Brian Behlendorf bc8c87d2f3 Missed one instance of losetup -f to unused_loop_device change 2009-07-21 17:05:13 -07:00
Brian Behlendorf b9c3c7a2f4 The losetup -f option is unavailable for SLES10 use unused_loop_device()
SLES10 ships util-linux-2.12r-35.30 which does not support the -f option
to losetup.  To avoid this problem the unused_loop_device() function was
added which attempts to find an unused loop device by checking each
/dev/loop* device with losetup to see if it is configured.
2009-07-21 16:17:54 -07:00
Brian Behlendorf e16ffab302 SPLBUILD now includes modules 2009-07-10 11:37:30 -07:00
Brian Behlendorf 70407622a7 Move `make check` ztest under ./scripts where the module stack is loaded. 2009-03-18 14:19:04 -07:00
Brian Behlendorf 3c9fa95530 Add 2 new args for zpool_create to take extra args 2009-02-06 14:57:37 -08:00
Brian Behlendorf 97e40aae09 Add 8 basic x4550 configurations which are of interest. 2009-02-06 11:47:09 -08:00
Brian Behlendorf 9e6f35e5cf Add loopback based test configs 2009-01-26 16:59:02 -08:00
Brian Behlendorf 39fe5b1cf9 Minor script fixes 2009-01-20 21:34:29 -08:00