4 # This file and its contents are supplied under the terms of the
5 # Common Development and Distribution License ("CDDL"), version 1.0.
6 # You may only use this file in accordance with the terms of version
9 # A full copy of the text of the CDDL should have accompanied this
10 # source. A copy of the CDDL is also available via the Internet at
11 # http://www.illumos.org/license/CDDL.
15 # Copyright (c) 2018 by Nutanix. All rights reserved.
18 . $STF_SUITE/include/libtest.shlib
22 # zdb -d will work on imported/exported pool with pool/dataset argument
26 # 2. Run zdb -d with pool and dataset arguments.
28 # 4. Run zdb -ed with pool and dataset arguments.
33 datasetexists $TESTPOOL && destroy_pool $TESTPOOL
34 for DISK in $DISKS; do
35 zpool labelclear -f $DEV_RDSKDIR/$DISK
39 log_assert "Verify zdb -d works on imported/exported pool with pool/dataset argument"
42 verify_runnable "global"
43 verify_disk_count "$DISKS" 2
45 default_mirror_setup_noexit $DISKS
46 log_must zfs snap $TESTPOOL/$TESTFS@snap
48 log_must zdb -d $TESTPOOL
49 log_must zdb -d $TESTPOOL/
50 log_must zdb -d $TESTPOOL/$TESTFS
51 log_must zdb -d $TESTPOOL/$TESTFS@snap
53 log_must zpool export $TESTPOOL
55 log_must zdb -ed $TESTPOOL
56 log_must zdb -ed $TESTPOOL/
57 log_must zdb -ed $TESTPOOL/$TESTFS
58 log_must zdb -ed $TESTPOOL/$TESTFS@snap
60 log_must zpool import $TESTPOOL
64 log_pass "zdb -d works on imported/exported pool with pool/dataset argument"