]>
Commit | Line | Data |
---|---|---|
6bb24f4d BB |
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) 2013 by Delphix. All rights reserved. | |
29 | # | |
30 | ||
31 | . $STF_SUITE/include/libtest.shlib | |
32 | ||
95401cb6 BB |
33 | export DISKSARRAY=$DISKS |
34 | export DISK_ARRAY_NUM=$(echo ${DISKS} | nawk '{print NF}') | |
35 | ||
6bb24f4d BB |
36 | function set_disks |
37 | { | |
38 | set -A disk_array $(find_disks $DISKS) | |
39 | typeset -i i=0 | |
40 | typeset -i limit=2 | |
41 | while (( i < limit )); do | |
42 | if [[ -n ${disk_array[$i]} ]]; then | |
43 | export DISK${i}="${disk_array[$i]}" | |
44 | else | |
45 | export DISK=${DISKS%% *} | |
46 | return | |
47 | fi | |
48 | ((i = i + 1)) | |
49 | done | |
50 | export DISK="" | |
51 | } | |
52 | ||
53 | export BLOCK_SIZE=8192 | |
54 | set_disks | |
55 | # | |
56 | # Do not make SIZE too large as the three slices may exceed | |
57 | # the size of the disk, and also slow down the test | |
58 | # which involves filling until ENOSPC | |
59 | # | |
60 | export SIZE="100mb" | |
61 | export SMALL_WRITE_COUNT=100 | |
62 | export TESTFILE1=file$$.1 | |
63 | export WRITE_COUNT=65536000 | |
64 | ||
65 | if is_linux; then | |
7050a65d SV |
66 | set_device_dir |
67 | set_slice_prefix | |
6bb24f4d BB |
68 | export SLICE=1 |
69 | export SLICE0=1 | |
70 | export SLICE1=2 | |
71 | else | |
72 | export SLICE_PREFIX="s" | |
73 | export SLICE=0 | |
74 | export SLICE0=0 | |
75 | export SLICE1=1 | |
76 | fi |