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/rsend/rsend_014_pos.ksh
+++ new/usr/src/test/zfs-tests/tests/functional/rsend/rsend_014_pos.ksh
1 1 #!/usr/bin/ksh
2 2
3 3 #
4 4 # This file and its contents are supplied under the terms of the
|
↓ open down ↓ |
4 lines elided |
↑ open up ↑ |
5 5 # Common Development and Distribution License ("CDDL"), version 1.0.
6 6 # You may only use this file in accordance with the terms of version
7 7 # 1.0 of the CDDL.
8 8 #
9 9 # A full copy of the text of the CDDL should have accompanied this
10 10 # source. A copy of the CDDL is also available via the Internet at
11 11 # http://www.illumos.org/license/CDDL.
12 12 #
13 13
14 14 #
15 -# Copyright (c) 2014 by Delphix. All rights reserved.
15 +# Copyright (c) 2014, 2016 by Delphix. All rights reserved.
16 16 #
17 17
18 18 . $STF_SUITE/include/libtest.shlib
19 19 . $STF_SUITE/tests/functional/rsend/rsend.kshlib
20 20
21 21 #
22 22 # Description:
23 23 # Verify that a pool imported readonly can be sent and received.
24 24 #
25 25 # Strategy:
26 26 # 1. Make the source pool readonly, and receive it into pool2.
27 27 # 2. Reset pool2, and repeat the send from a non-root fs of the source pool.
28 28 # 3. Make the source pool read-write again.
29 29 #
30 30
31 31 verify_runnable "both"
32 32
33 33 log_assert "zfs send will work on filesystems and volumes in a read-only pool."
34 34 log_onexit cleanup_pool $POOL2
35 35
36 -log_must eval "$ZPOOL export $POOL"
37 -log_must eval "$ZPOOL import -o readonly=on $POOL"
38 -log_must eval "$ZFS send -R $POOL@final > $BACKDIR/pool-final-R"
39 -log_must eval "$ZFS receive -d -F $POOL2 < $BACKDIR/pool-final-R"
36 +log_must eval "zpool export $POOL"
37 +log_must eval "zpool import -o readonly=on $POOL"
38 +log_must eval "zfs send -R $POOL@final > $BACKDIR/pool-final-R"
39 +log_must eval "zfs receive -d -F $POOL2 < $BACKDIR/pool-final-R"
40 40
41 41 dstds=$(get_dst_ds $POOL $POOL2)
42 42 log_must cmp_ds_subs $POOL $dstds
43 43 log_must cmp_ds_cont $POOL $dstds
44 44
45 45 log_must cleanup_pool $POOL2
46 46
47 -log_must eval "$ZFS send -R $POOL/$FS@final > $BACKDIR/fs-final-R"
48 -log_must eval "$ZFS receive -d $POOL2 < $BACKDIR/fs-final-R"
49 -log_must eval "$ZPOOL export $POOL"
50 -log_must eval "$ZPOOL import $POOL"
47 +log_must eval "zfs send -R $POOL/$FS@final > $BACKDIR/fs-final-R"
48 +log_must eval "zfs receive -d $POOL2 < $BACKDIR/fs-final-R"
49 +log_must eval "zpool export $POOL"
50 +log_must eval "zpool import $POOL"
51 51
52 52 dstds=$(get_dst_ds $POOL/$FS $POOL2)
53 53 log_must cmp_ds_subs $POOL/$FS $dstds
54 54 log_must cmp_ds_cont $POOL/$FS $dstds
55 55
56 56 log_pass "zfs send will work on filesystems and volumes in a read-only pool."
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX