]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blob - zfs/tests/zfs-tests/tests/functional/features/large_dnode/large_dnode_004_neg.ksh
UBUNTU: SAUCE: Update zfs to e02aaf17f15ad274fa1f24c9c826f1477911ea3f
[mirror_ubuntu-zesty-kernel.git] / zfs / tests / zfs-tests / tests / functional / features / large_dnode / large_dnode_004_neg.ksh
1 #!/bin/ksh -p
2 #
3 # CDDL HEADER START
4 #
5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License (the "License").
7 # You may not use this file except in compliance with the License.
8 #
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
13 #
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
19 #
20 # CDDL HEADER END
21 #
22
23 . $STF_SUITE/include/libtest.shlib
24
25 verify_runnable "both"
26
27 TEST_FS=$TESTPOOL/large_dnode
28 TEST_SNAP=$TESTPOOL/large_dnode@ldnsnap
29 TEST_STREAM=$TESTDIR/ldnsnap
30
31 function cleanup
32 {
33 if datasetexists $TEST_FS ; then
34 log_must $ZFS destroy -r $TEST_FS
35 fi
36
37 if datasetexists $LGCYPOOL ; then
38 log_must $ZPOOL destroy -f $LGCYPOOL
39 fi
40
41 rm -f $TEST_STREAM
42 }
43
44 log_onexit cleanup
45 log_assert "zfs send stream with large dnodes not accepted by legacy pool"
46
47 log_must $ZFS create -o dnodesize=1k $TEST_FS
48 log_must touch /$TEST_FS/foo
49 log_must $ZFS umount $TEST_FS
50 log_must $ZFS snap $TEST_SNAP
51 log_must eval "$ZFS send $TEST_SNAP > $TEST_STREAM"
52
53 LGCYPOOL=ldnpool
54 LGCYFS=$LGCYPOOL/legacy
55 log_must $MKFILE 64M $TESTDIR/$LGCYPOOL
56 log_must $ZPOOL create -d $LGCYPOOL $TESTDIR/$LGCYPOOL
57 log_mustnot eval "$ZFS recv $LGCYFS < $TEST_STREAM"
58
59 log_pass