Print this page
7290 ZFS test suite needs to control what utilities it can run
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/test/zfs-tests/tests/functional/holes/holes.shlib
+++ new/usr/src/test/zfs-tests/tests/functional/holes/holes.shlib
1 1 #
2 2 # This file and its contents are supplied under the terms of the
|
↓ open down ↓ |
2 lines elided |
↑ open up ↑ |
3 3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 4 # You may only use this file in accordance with the terms of version
5 5 # 1.0 of the CDDL.
6 6 #
7 7 # A full copy of the text of the CDDL should have accompanied this
8 8 # source. A copy of the CDDL is also available via the Internet at
9 9 # http://www.illumos.org/license/CDDL.
10 10 #
11 11
12 12 #
13 -# Copyright (c) 2014 by Delphix. All rights reserved.
13 +# Copyright (c) 2014, 2016 by Delphix. All rights reserved.
14 14 #
15 15
16 16 # testfile The file to examine.
17 17 # hole_blks The expected number of holes.
18 18 # data_blks The expected number of data blocks.
19 19 function verify_holes_and_data_blocks
20 20 {
21 21 typeset testfile=$1
22 22 typeset -i hole_blks=$2
23 23 typeset -i data_blks=$3
24 24 typeset -i failures=0
25 25
26 - found_hole_blks=$($GETHOLES -h $testfile)
27 - found_data_blks=$($GETHOLES -d $testfile)
26 + found_hole_blks=$(getholes -h $testfile)
27 + found_data_blks=$(getholes -d $testfile)
28 28 if [[ $found_hole_blks -ne $hole_blks ]] then;
29 29 log_note "Found $found_hole_blks, not $hole_blks hole blocks."
30 30 ((failures++))
31 31 fi
32 32
33 33 if [[ $found_data_blks -ne $data_blks ]] then;
34 34 log_note "Found $found_data_blks, not $data_blks data blocks."
35 35 ((failures++))
36 36 fi
37 37
38 38 [[ $failures -eq 0 ]] || log_fail "Wrong number of data/hole blocks."
39 39 }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX