5 # This file and its contents are supplied under the terms of the
6 # Common Development and Distribution License ("CDDL"), version 1.0.
7 # You may only use this file in accordance with the terms of version
10 # A full copy of the text of the CDDL should have accompanied this
11 # source. A copy of the CDDL is also available via the Internet at
12 # http://www.illumos.org/license/CDDL.
18 # Copyright (c) 2014, 2017 by Delphix. All rights reserved.
21 .
$STF_SUITE/include
/libtest.shlib
22 .
$STF_SUITE/tests
/functional
/removal
/removal.kshlib
24 zdbout
=${TMPDIR:-$TEST_BASE_DIR}/zdbout.$$
27 log_unsupported
"ZDB fails during concurrent pool activity."
32 default_cleanup_noexit
33 log_must
rm -f $zdbout
36 default_setup_noexit
"$DISKS"
38 FIRSTDISK
=${DISKS%% *}
43 DISKPATH
=$
(dirname $FIRSTDISK)
52 log_must zpool
set cachefile
=none
$TESTPOOL
53 zdb
-e -p $DISKPATH -cudi $TESTPOOL >$zdbout 2>&1
55 log_must zpool
set cachefile
= $TESTPOOL
56 if [[ $zdbstat != 0 ]]; then
57 log_note
"Output: zdb -e -p $DISKPATH -cudi $TESTPOOL"
59 log_note
"zdb detected errors with exist status $zdbstat."
61 log_note
"zdb -e -p $DISKPATH -cudi $TESTPOOL >zdbout 2>&1"
65 test_removal_with_operation callback
67 log_must zpool
set cachefile
=none
$TESTPOOL
68 zdb
-e -p $DISKPATH -cudi $TESTPOOL >$zdbout 2>&1
70 log_must zpool
set cachefile
= $TESTPOOL
71 if [[ $zdbstat != 0 ]]; then
72 log_note
"Output following removal: zdb -cudi $TESTPOOL"
74 log_fail
"zdb detected errors with exit status " \
75 "$zdbstat following removal."
78 log_pass
"Can use zdb during removal"