]>
git.proxmox.com Git - mirror_zfs-debian.git/blob - tests/zfs-tests/tests/functional/cli_root/zdb/zdb_002_pos.ksh
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) 2015 by Delphix. All rights reserved.
18 .
$STF_SUITE/include
/libtest.shlib
22 # zdb will accurately count the feature refcount for pools with and without
26 # 1. Create a pool, and collect zdb output for the pool.
27 # 2. Verify there are no 'feature refcount mismatch' messages.
28 # 3. Repeat for a pool with features disabled.
31 log_assert
"Verify zdb accurately counts feature refcounts."
34 typeset errstr
="feature refcount mismatch"
35 typeset tmpfile
="/var/tmp/zdb-feature-mismatch"
38 datasetexists
$TESTPOOL && destroy_pool
$TESTPOOL
39 grep "$errstr" $tmpfile
44 log_must zpool create
-f $opt $TESTPOOL ${DISKS%% *}
45 log_must
eval "zdb $TESTPOOL >$tmpfile"
46 grep -q "$errstr" $tmpfile && \
47 log_fail
"Found feature refcount mismatches in zdb output."
48 destroy_pool
$TESTPOOL
51 log_pass
"zdb accurately counts feature refcounts."