]> granicus.if.org Git - zfs/commit
Real disk partitioning now enabled in test suite for Linux
authorSydney Vanda <sydney.m.vanda@intel.com>
Fri, 22 Jul 2016 15:07:04 +0000 (15:07 +0000)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 8 Sep 2016 20:45:34 +0000 (13:45 -0700)
commit7050a65d5c760aa039d195fe0b6773a20a81048b
tree70bc4498bee7878d4abab11b95a7113c341b8152
parent178acea364bc19da6cd30c6aaa7147f9a14fdb5a
Real disk partitioning now enabled in test suite for Linux

When using real devices, specify DISKS="sdb sdc sdd" opposed to
/dev/sdb in zfs-tests.sh - otherwise errors with directory names and
disk names registering as "/dev//dev/sdb" for some tests.  The same
goes for mpath: DISK="mpatha mpathad mpathb"

Expected Usage:

$ DISKS="sdb sdc sdd" zfs-tests.sh

SLICE_PREFIX is now set as "p" for a loop device (ie loop0p2) or
"" for a real device (ie sdb2), or either for multipath devices
(ie mpatha1 or mpath1p1) instead of only "p" by default.  Note that
kpartx partitioning is not currently supported in this patch
(ie "partx") and may need to be disabled on Debian distributions.
Functions added for determining test directory (/dev or /dev/mapper)
as well as slice prefix are determined and exported mostly in the cfg
file of each test group directory.

Currently zpools cannot be created on whole mpath devices that have
been partitioned. In order to fix this tests have either been revised
to use a partition instead, or if there is a size constraint and the
pool needs to be created on the whole disk, partitions are then deleted
if the device is a multipath device.  This functionality is added to
default_cleanup() or to individual cleanup scripts if a non-default
cleanup method is used.

The max partitions is currently set at 8 to account for all of the
tests thus far.

Patch changes are generally encompassed in "if is_linux" construct.

Signed-off-by: Sydney Vanda <sydney.m.vanda@intel.com>
Reviewed-by: John Salinas <John.Salinas@intel.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: David Quigley <david.quigley@intel.com>
Closes #4447
Closes #4964
Closes #5074
64 files changed:
config/user-commands.m4
tests/zfs-tests/include/commands.cfg.in
tests/zfs-tests/include/default.cfg.in
tests/zfs-tests/include/libtest.shlib
tests/zfs-tests/tests/functional/cache/cache.cfg
tests/zfs-tests/tests/functional/cache/setup.ksh
tests/zfs-tests/tests/functional/clean_mirror/cleanup.ksh
tests/zfs-tests/tests/functional/clean_mirror/default.cfg
tests/zfs-tests/tests/functional/clean_mirror/setup.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_add/cleanup.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_add/setup.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add.cfg
tests/zfs-tests/tests/functional/cli_root/zpool_create/setup.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create.cfg
tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_003_pos.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_006_pos.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_021_pos.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_022_pos.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_001_pos.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_002_pos.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_003_pos.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_004_neg.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_destroy/zpool_destroy.cfg
tests/zfs-tests/tests/functional/cli_root/zpool_export/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zpool_export/setup.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_export/zpool_export.cfg [new file with mode: 0644]
tests/zfs-tests/tests/functional/cli_root/zpool_export/zpool_export_001_pos.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_import/cleanup.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_import/setup.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import.cfg
tests/zfs-tests/tests/functional/cli_root/zpool_remove/cleanup.ksh
tests/zfs-tests/tests/functional/cli_root/zpool_remove/zpool_remove.cfg
tests/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub.cfg
tests/zfs-tests/tests/functional/grow_pool/grow_pool.cfg
tests/zfs-tests/tests/functional/grow_replicas/grow_replicas.cfg
tests/zfs-tests/tests/functional/inuse/inuse.cfg
tests/zfs-tests/tests/functional/migration/cleanup.ksh
tests/zfs-tests/tests/functional/migration/migration.cfg
tests/zfs-tests/tests/functional/migration/setup.ksh
tests/zfs-tests/tests/functional/mmap/Makefile.am
tests/zfs-tests/tests/functional/mmap/mmap.cfg [new file with mode: 0644]
tests/zfs-tests/tests/functional/mmap/mmap_read_001_pos.ksh
tests/zfs-tests/tests/functional/mv_files/mv_files.cfg
tests/zfs-tests/tests/functional/no_space/cleanup.ksh
tests/zfs-tests/tests/functional/no_space/enospc.cfg
tests/zfs-tests/tests/functional/no_space/setup.ksh
tests/zfs-tests/tests/functional/online_offline/online_offline.cfg
tests/zfs-tests/tests/functional/rsend/rsend.cfg
tests/zfs-tests/tests/functional/scrub_mirror/cleanup.ksh
tests/zfs-tests/tests/functional/scrub_mirror/default.cfg
tests/zfs-tests/tests/functional/sparse/sparse.cfg
tests/zfs-tests/tests/functional/truncate/truncate.cfg
tests/zfs-tests/tests/functional/write_dirs/Makefile.am
tests/zfs-tests/tests/functional/write_dirs/cleanup.ksh
tests/zfs-tests/tests/functional/write_dirs/setup.ksh
tests/zfs-tests/tests/functional/write_dirs/write_dirs.cfg [new file with mode: 0644]
tests/zfs-tests/tests/functional/write_dirs/write_dirs_001_pos.ksh
tests/zfs-tests/tests/functional/write_dirs/write_dirs_002_pos.ksh
tests/zfs-tests/tests/functional/zvol/zvol_ENOSPC/Makefile.am
tests/zfs-tests/tests/functional/zvol/zvol_ENOSPC/setup.ksh
tests/zfs-tests/tests/functional/zvol/zvol_ENOSPC/zvol_ENOSPC.cfg [new file with mode: 0644]
tests/zfs-tests/tests/functional/zvol/zvol_cli/Makefile.am
tests/zfs-tests/tests/functional/zvol/zvol_cli/setup.ksh
tests/zfs-tests/tests/functional/zvol/zvol_cli/zvol_cli.cfg [new file with mode: 0644]