OpenZFS 7260 - disable libdiskmgmt in zfstest unless it's required

Authored by: John Wren Kennedy <john.kennedy@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Ported-by: George Melikov <mail@gmelikov.ru>

OpenZFS-issue: https://www.illumos.org/issues/7260
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/447b1e1
Closes #5794

Porting notes:
- The library libdiskmgmt is specific to illumos so these changes
  currently have no impact under Linux.  This mechanism could be
  potentially leveraged in the future.
This commit is contained in:
John Wren Kennedy
2016-08-08 09:41:07 -07:00
committed by Brian Behlendorf
parent a454868b0c
commit 2171eb7112
12 changed files with 27 additions and 16 deletions
@@ -26,7 +26,7 @@
#
#
# Copyright (c) 2013 by Delphix. All rights reserved.
# Copyright (c) 2013, 2015 by Delphix. All rights reserved.
#
. $STF_SUITE/include/libtest.shlib
@@ -79,6 +79,7 @@ dumpdev=`$DUMPADM | $GREP "Dump device" | $AWK '{print $3}'`
log_untested "Dump device has not been been configured to $diskslice"
log_note "Attempt to zpool the dump device"
unset NOINUSE_CHECK
log_mustnot $ZPOOL create $TESTPOOL "$diskslice"
log_mustnot poolexists $TESTPOOL
@@ -26,11 +26,7 @@
#
#
# Copyright (c) 2012 by Delphix. All rights reserved.
#
#
# Copyright (c) 2013 by Delphix. All rights reserved.
# Copyright (c) 2012, 2015 by Delphix. All rights reserved.
#
. $STF_SUITE/include/libtest.shlib
@@ -141,6 +137,7 @@ log_note "$UFSDUMP 0bf 512 $rawdisk0 $disk1"
$UFSDUMP 0bf 512 $rawdisk0 $disk1 &
PIDUFSDUMP=$!
unset NOINUSE_CHECK
log_note "Attempt to zpool the source device in use by ufsdump"
log_mustnot $ZPOOL create $TESTPOOL1 "$disk1"
log_mustnot poolexists $TESTPOOL1
@@ -26,7 +26,7 @@
#
#
# Copyright (c) 2013 by Delphix. All rights reserved.
# Copyright (c) 2013, 2015 by Delphix. All rights reserved.
#
. $STF_SUITE/include/libtest.shlib
@@ -76,6 +76,7 @@ set -A vdevs "" "mirror" "raidz" "raidz1" "raidz2"
typeset -i i=0
unset NOINUSE_CHECK
while (( i < ${#vdevs[*]} )); do
for num in 0 1 2 3 ; do
@@ -26,7 +26,7 @@
#
#
# Copyright (c) 2013 by Delphix. All rights reserved.
# Copyright (c) 2013, 2015 by Delphix. All rights reserved.
#
. $STF_SUITE/include/libtest.shlib
@@ -79,6 +79,7 @@ typeset -i i=0
PREVDUMPDEV=`$DUMPADM | $GREP "Dump device" | $AWK '{print $3}'`
unset NOINUSE_CHECK
while (( i < ${#vdevs[*]} )); do
for num in 0 1 2 3 ; do