comparison usr/src/test/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import.cfg @ 13899:0bcf78798346

3311 Want a test framework for arbitrary OS unit tests 3312 Add a testrunner package for OS unit tests 3313 Add a testrunner package to convert ZFS tests from STF Reviewed by: Matt Ahrens <matthew.ahrens@delphix.com> Reviewed by: Will Guyette <will.guyette@delphix.com> Reviewed by: Dan Kimmel <dan.kimmel@delphix.com> Reviewed by: Adam Leventhal <ahl@delphix.com> Reviewed by: Henrik Mattson <henrik.mattson@delphix.com> Reviewed by: Sonu Pillai <sonu.pillai@delphix.com> Reviewed by: Christopher Siden <chris.siden@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Richard Lowe <richlowe@richlowe.net> Approved by: Richard Lowe <richlowe@richlowe.net>
author John Wren Kennedy <john.kennedy@delphix.com>
date Wed, 05 Dec 2012 22:04:50 -0500
parents
children
comparison
equal deleted inserted replaced
13898:7f822b09519b 13899:0bcf78798346
1 #
2 # CDDL HEADER START
3 #
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
7 #
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
12 #
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 #
19 # CDDL HEADER END
20 #
21
22 #
23 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
25 #
26
27 #
28 # Copyright (c) 2012 by Delphix. All rights reserved.
29 #
30
31 . $STF_SUITE/include/libtest.shlib
32
33 typeset -a disk_array=($(find_disks $DISKS))
34 case "${#disk_array[*]}" in
35 0)
36 #
37 # on stf_configure, disk_freelist returns empty.
38 #
39 DISK_COUNT=0
40 ;;
41 1)
42 # We need to repartition the single disk to two slices.
43 DISK_COUNT=1
44 ZFS_DISK1=${disk_array[0]}
45 ZFSSIDE_DISK1=${ZFS_DISK1}s0
46 ZFS_DISK2=${disk_array[0]}
47 ZFSSIDE_DISK2=${ZFS_DISK2}s1
48 ;;
49 *)
50 # We need to repartition the single disk to two slices.
51 DISK_COUNT=2
52 ZFS_DISK1=${disk_array[0]}
53 ZFSSIDE_DISK1=${ZFS_DISK1}s0
54 ZFS_DISK2=${disk_array[1]}
55 ZFSSIDE_DISK2=${ZFS_DISK2}s0
56 ;;
57 esac
58
59 export DISK_COUNT ZFS_DISK1 ZFSSIDE_DISK1 ZFS_DISK2 ZFSSIDE_DISK2
60
61 export FS_SIZE=2gb
62 export FILE_SIZE=64m
63 export SLICE_SIZE=128m
64 export MAX_NUM=5
65 export GROUP_NUM=3
66 export DEVICE_DIR=/dev_import-test
67 export BACKUP_DEVICE_DIR=/bakdev_import-test
68 export DEVICE_FILE=disk
69 export DEVICE_ARCHIVE=archive_import-test
70 export MYTESTFILE=$STF_SUITE/include/libtest.shlib
71
72 typeset -i num=0
73 while (( num < $GROUP_NUM )); do
74 DEVICE_FILES="$DEVICE_FILES ${DEVICE_DIR}/${DEVICE_FILE}$num"
75 (( num = num + 1 ))
76 done
77 export DEVICE_FILES
78
79 export VDEV0=$DEVICE_DIR/${DEVICE_FILE}0
80 export VDEV1=$DEVICE_DIR/${DEVICE_FILE}1
81 export VDEV2=$DEVICE_DIR/${DEVICE_FILE}2
82 export VDEV3=$DEVICE_DIR/${DEVICE_FILE}3
83 export VDEV4=$DEVICE_DIR/${DEVICE_FILE}4
84
85 export ALTER_ROOT=/alter_import-test