215198a6ad15cf4832370e2f19247abeb36b951aJoe Stein# CDDL HEADER START
215198a6ad15cf4832370e2f19247abeb36b951aJoe Stein# This file and its contents are supplied under the terms of the
215198a6ad15cf4832370e2f19247abeb36b951aJoe Stein# Common Development and Distribution License ("CDDL"), version 1.0.
215198a6ad15cf4832370e2f19247abeb36b951aJoe Stein# You may only use this file in accordance with the terms of version
215198a6ad15cf4832370e2f19247abeb36b951aJoe Stein# 1.0 of the CDDL.
215198a6ad15cf4832370e2f19247abeb36b951aJoe Stein# A full copy of the text of the CDDL should have accompanied this
215198a6ad15cf4832370e2f19247abeb36b951aJoe Stein# source. A copy of the CDDL is also available via the Internet at
215198a6ad15cf4832370e2f19247abeb36b951aJoe Stein# CDDL HEADER END
1d32ba663e202c24a5a1f2e5aef83fffb447cb7fJohn Wren Kennedy# Copyright (c) 2015, 2016 by Delphix. All rights reserved.
215198a6ad15cf4832370e2f19247abeb36b951aJoe Stein dsk_line=$(grep -n "$regex" "$conf" | awk -F: '{print $1}')
215198a6ad15cf4832370e2f19247abeb36b951aJoe Stein grep -n "children\[" | awk -F: '{print $1}' | head -n 1)
215198a6ad15cf4832370e2f19247abeb36b951aJoe Stein section=$(cat "$conf" | sed "1,${dsk_line}d" | head -n \
215198a6ad15cf4832370e2f19247abeb36b951aJoe Stein "com.delphix:vdev_zap_leaf: [0-9]+" | awk '{print $2}'
215198a6ad15cf4832370e2f19247abeb36b951aJoe Stein "com.delphix:vdev_zap_top: [0-9]+" | awk '{print $2}'
215198a6ad15cf4832370e2f19247abeb36b951aJoe Stein [[ -z "$res" ]] && log_fail "Pool missing ZAP feature sentinel value"
215198a6ad15cf4832370e2f19247abeb36b951aJoe Stein elif [[ -z "$(zdb -d $pool $zapobj | grep 'zap')" ]]; then
215198a6ad15cf4832370e2f19247abeb36b951aJoe Stein# Code common to setup/teardown for each test.
215198a6ad15cf4832370e2f19247abeb36b951aJoe Stein if [[ -e $conf ]]; then
215198a6ad15cf4832370e2f19247abeb36b951aJoe Stein if [[ -e $POOL2 ]]; then