xref: /illumos-gate/usr/src/test/zfs-tests/tests/functional/cache/cache.cfg (revision c1d5c2a48971d1705730e1ade6a1bc4d56587416)
1f38cb554SJohn Wren Kennedy#
2f38cb554SJohn Wren Kennedy# CDDL HEADER START
3f38cb554SJohn Wren Kennedy#
4f38cb554SJohn Wren Kennedy# The contents of this file are subject to the terms of the
5f38cb554SJohn Wren Kennedy# Common Development and Distribution License (the "License").
6f38cb554SJohn Wren Kennedy# You may not use this file except in compliance with the License.
7f38cb554SJohn Wren Kennedy#
8f38cb554SJohn Wren Kennedy# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9f38cb554SJohn Wren Kennedy# or http://www.opensolaris.org/os/licensing.
10f38cb554SJohn Wren Kennedy# See the License for the specific language governing permissions
11f38cb554SJohn Wren Kennedy# and limitations under the License.
12f38cb554SJohn Wren Kennedy#
13f38cb554SJohn Wren Kennedy# When distributing Covered Code, include this CDDL HEADER in each
14f38cb554SJohn Wren Kennedy# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15f38cb554SJohn Wren Kennedy# If applicable, add the following below this CDDL HEADER, with the
16f38cb554SJohn Wren Kennedy# fields enclosed by brackets "[]" replaced with your own identifying
17f38cb554SJohn Wren Kennedy# information: Portions Copyright [yyyy] [name of copyright owner]
18f38cb554SJohn Wren Kennedy#
19f38cb554SJohn Wren Kennedy# CDDL HEADER END
20f38cb554SJohn Wren Kennedy#
21f38cb554SJohn Wren Kennedy
22f38cb554SJohn Wren Kennedy#
23f38cb554SJohn Wren Kennedy# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24f38cb554SJohn Wren Kennedy# Use is subject to license terms.
25f38cb554SJohn Wren Kennedy#
26f38cb554SJohn Wren Kennedy
27f38cb554SJohn Wren Kennedy#
284b5c8e93SMatthew Ahrens# Copyright (c) 2013, 2015 by Delphix. All rights reserved.
29*c1d5c2a4SKody Kantor# Copyright 2019 Joyent, Inc.
30f38cb554SJohn Wren Kennedy#
31f38cb554SJohn Wren Kennedy
32f38cb554SJohn Wren Kennedy. $STF_SUITE/include/libtest.shlib
33f38cb554SJohn Wren Kennedy
34f38cb554SJohn Wren Kennedyfunction set_disks
35f38cb554SJohn Wren Kennedy{
36f38cb554SJohn Wren Kennedy	set -A disk_array $(find_disks $DISKS)
37f38cb554SJohn Wren Kennedy
38f38cb554SJohn Wren Kennedy	typeset -i DISK_ARRAY_NUM=0
39f38cb554SJohn Wren Kennedy
40f38cb554SJohn Wren Kennedy	if (( ${#disk_array[*]} <= 1 )); then
41f38cb554SJohn Wren Kennedy		export DISK=${DISKS%% *}
42f38cb554SJohn Wren Kennedy	else
43f38cb554SJohn Wren Kennedy		export DISK=""
44f38cb554SJohn Wren Kennedy		typeset -i i=0
45f38cb554SJohn Wren Kennedy		while (( i < ${#disk_array[*]} )); do
46f38cb554SJohn Wren Kennedy			export DISK${i}="${disk_array[$i]}"
47f38cb554SJohn Wren Kennedy			DISKSARRAY="$DISKSARRAY ${disk_array[$i]}"
48f38cb554SJohn Wren Kennedy			(( i = i + 1 ))
49f38cb554SJohn Wren Kennedy		done
50f38cb554SJohn Wren Kennedy		export DISK_ARRAY_NUM=$i
51f38cb554SJohn Wren Kennedy		export DISKSARRAY
52f38cb554SJohn Wren Kennedy	fi
53f38cb554SJohn Wren Kennedy
54f38cb554SJohn Wren Kennedy	if (( $DISK_ARRAY_NUM == 0 )); then
55f38cb554SJohn Wren Kennedy		export disk=$DISK
56f38cb554SJohn Wren Kennedy	else
57f38cb554SJohn Wren Kennedy		export disk=$DISK0
58f38cb554SJohn Wren Kennedy	fi
59f38cb554SJohn Wren Kennedy}
60f38cb554SJohn Wren Kennedy
61f38cb554SJohn Wren Kennedyset_disks
62f38cb554SJohn Wren Kennedy
634b5c8e93SMatthew Ahrensexport SIZE=$MINVDEVSIZE
64f38cb554SJohn Wren Kennedy
65c09fb523SKody Kantorexport VDIR=$TESTDIR/disk.cache
66c09fb523SKody Kantorexport VDIR2=$TESTDIR/disk2.cache
67f38cb554SJohn Wren Kennedy
68f38cb554SJohn Wren Kennedyexport VDEV="$VDIR/a $VDIR/b $VDIR/c"
69f38cb554SJohn Wren Kennedyexport LDEV="$DISK0"
70f38cb554SJohn Wren Kennedyexport VDEV2="$VDIR2/a $VDIR2/b $VDIR2/c"
71f38cb554SJohn Wren Kennedyexport LDEV2="$DISK1"
72*c1d5c2a4SKody Kantorexport FILEDEV="$VDIR2/d"
73