Print this page
14163 zfs-tests: remove_raidz.ksh is broken
Reviewed by: Andy Fiddaman <andy@omnios.org>
Approved by: Robert Mustacchi <rm@fingolfin.org>
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/test/zfs-tests/tests/functional/removal/remove_raidz.ksh
+++ new/usr/src/test/zfs-tests/tests/functional/removal/remove_raidz.ksh
1 1 #! /bin/ksh -p
2 2 #
3 3 # CDDL HEADER START
4 4 #
5 5 # This file and its contents are supplied under the terms of the
6 6 # Common Development and Distribution License ("CDDL"), version 1.0.
7 7 # You may only use this file in accordance with the terms of version
8 8 # 1.0 of the CDDL.
9 9 #
10 10 # A full copy of the text of the CDDL should have accompanied this
11 11 # source. A copy of the CDDL is also available via the Internet at
12 12 # http://www.illumos.org/license/CDDL.
13 13 #
14 14 # CDDL HEADER END
15 15 #
16 16
17 17 #
|
↓ open down ↓ |
17 lines elided |
↑ open up ↑ |
18 18 # Copyright (c) 2014, 2016 by Delphix. All rights reserved.
19 19 #
20 20
21 21 . $STF_SUITE/include/libtest.shlib
22 22 . $STF_SUITE/tests/functional/removal/removal.kshlib
23 23
24 24 TMPDIR=${TMPDIR:-/tmp}
25 25 log_must mkfile $MINVDEVSIZE $TMPDIR/dsk1
26 26 log_must mkfile $MINVDEVSIZE $TMPDIR/dsk2
27 27 log_must mkfile $MINVDEVSIZE $TMPDIR/dsk3
28 -DISKS="$TMPDIR/dsk1 raidz $TMPDIR/dsk2 $TMPDIR/dsk3"
28 +DISKS1="$TMPDIR/dsk1"
29 +DISKS2="$TMPDIR/dsk2 $TMPDIR/dsk3"
30 +DISKS="$DISKS1 $DISKS2"
29 31
30 32 function cleanup
31 33 {
32 34 default_cleanup_noexit
33 35 log_must rm -f $DISKS
34 36 }
35 37
36 -log_must default_setup_noexit "$DISKS"
38 +log_must default_setup_noexit "$DISKS1 raidz $DISKS2"
37 39 log_onexit cleanup
38 40
39 41 # Attempt to remove the non raidz disk.
40 42 log_mustnot zpool remove $TESTPOOL $TMPDIR/dsk1
41 43
42 44 # Attempt to remove one of the raidz disks.
43 45 log_mustnot zpool remove $TESTPOOL $TMPDIR/dsk2
44 46
45 47 # Attempt to remove the raidz.
46 48 log_mustnot zpool remove $TESTPOOL raidz1-1
47 49
48 50 log_pass "Removal will not succeed if there is a top level mirror."
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX