Commit Graph

437 Commits

Author SHA1 Message Date
Brian Behlendorf
2510936ded Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-08-10 11:08:59 -07:00
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
7b66ddcd84 Refresh autogen.sh products 2010-08-09 16:59:53 -07:00
Brian Behlendorf
1fcf8bdb82 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-08-09 16:54:01 -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
b7b7b19478 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-08-05 11:33:43 -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
121b1ceddc Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-08-02 13:24:23 -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
37e5e668d6 Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-08-02 13:21:57 -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
ca60603ce7 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-08-02 12:55:02 -07:00
Brian Behlendorf
f58729aa42 Merge branch 'linux-kernel-disk' into refs/top-bases/linux-zfs-branch 2010-08-02 12:54:55 -07:00
Brian Behlendorf
dd9a55895a Revert zconfig.sh test 4
This test was accidentally readded to the linux-kernel-disk
topic branch.  It is being reverted so it can be reapplied with
a few minor tweaks in the right place.
2010-08-02 11:53:38 -07:00
Brian Behlendorf
cea6f7c823 Refresh autogen products 2010-07-28 17:00:38 -07:00
Brian Behlendorf
62788ec38a Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-07-28 16:54:48 -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
96ae916dbe Merge commit 'refs/top-bases/linux-kernel-disk' into linux-kernel-disk 2010-07-28 16:52:38 -07:00
Brian Behlendorf
1f1212fc5f Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-07-28 16:52:22 -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
848b738177 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-07-28 16:47:08 -07:00
Brian Behlendorf
b2c62c2caa Merge branch 'linux-zpios' into refs/top-bases/linux-zfs-branch 2010-07-28 16:47:05 -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
f454edf52f Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-07-28 16:41:34 -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
646047cfb8 Merge commit 'refs/top-bases/linux-kernel-disk' into linux-kernel-disk 2010-07-28 16:38:34 -07:00
Brian Behlendorf
9c024583e9 Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch
Conflicts:

	scripts/common.sh.in
2010-07-28 16:36:49 -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
d825659880 Refresh autogen products 2010-07-28 09:49:38 -07:00
Brian Behlendorf
641f300534 Refresh autogen products 2010-07-23 11:50:26 -07:00
Brian Behlendorf
3992d0811c Refresh autogen products 2010-07-23 10:48:54 -07:00
Brian Behlendorf
5f78450b86 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-07-17 16:06:27 -07:00
Brian Behlendorf
df51ecbf9b Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2010-07-17 16:05:01 -07:00
Brian Behlendorf
a5243a987b Merge commit 'refs/top-bases/linux-kernel-disk' into linux-kernel-disk 2010-07-17 16:04:31 -07:00
Brian Behlendorf
b9dd097bab Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-07-17 16:04:18 -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
7f41f96626 Refresh autogen products 2010-07-14 10:51:41 -07:00
Brian Behlendorf
f0ff2eddbe Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-07-02 12:26:09 -07:00
Brian Behlendorf
3af0250f6d Merge branch 'linux-kernel-disk' into refs/top-bases/linux-zfs-branch 2010-07-02 12:26:06 -07:00
Brian Behlendorf
45cb33f64f Ensure devices are always created/removed
Devices were only being created at module load time or when a
dataset was created.  Similiar devices were not always being
removed at all the correct times.  This patch updates all the
places where devices should either be created or removed.  I'm
reasonably sure I got them all but if theres a case I missed
we can catch it with a follow up patch.

        module load/unload
        zfs create/remove
        zpool import/export
        zpool destroy

This patch also adds a simple regression test to zconfig.sh
to ensure zpool import/export is basically working properly.
This test specifically checks that devices are created
properly, removed after export, created after import, and
removed as a consequence of a zpool destroy.
2010-07-02 12:21:39 -07:00
Brian Behlendorf
e5a5693222 Refresh autogen.sh products 2010-06-29 17:05:00 -07:00
Brian Behlendorf
98c6ae53c8 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-05-28 22:25:41 -07:00
Brian Behlendorf
b41143632b Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch
Conflicts:
	cmd/zpool/zpool_main.c
	cmd/zpool/zpool_vdev.c
	cmd/ztest/ztest.c
	lib/libzfs/libzfs_dataset.c
	lib/libzfs/libzfs_import.c
	lib/libzfs/libzfs_mount.c
	lib/libzfs/libzfs_pool.c
	lib/libzfs/libzfs_sendrecv.c
	lib/libzpool/include/sys/zfs_context.h
	module/zcommon/include/sys/fs/zfs.h
	module/zcommon/zfs_comutil.c
	module/zfs/arc.c
	module/zfs/dmu.c
	module/zfs/dmu_objset.c
	module/zfs/dmu_send.c
	module/zfs/dmu_tx.c
	module/zfs/dsl_dataset.c
	module/zfs/dsl_dir.c
	module/zfs/dsl_scrub.c
	module/zfs/fm.c
	module/zfs/include/sys/dmu.h
	module/zfs/include/sys/fm/fs/zfs.h
	module/zfs/include/sys/fm/protocol.h
	module/zfs/include/sys/spa.h
	module/zfs/include/sys/zfs_context.h
	module/zfs/include/sys/zfs_ioctl.h
	module/zfs/include/sys/zvol.h
	module/zfs/spa.c
	module/zfs/spa_boot.c
	module/zfs/spa_history.c
	module/zfs/spa_misc.c
	module/zfs/txg.c
	module/zfs/vdev.c
	module/zfs/zfs_fm.c
	module/zfs/zfs_ioctl.c
	module/zfs/zfs_replay.c
	module/zfs/zfs_znode.c
	module/zfs/zil.c
	module/zfs/zio.c
2010-05-28 22:14:39 -07:00