dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / test / zfs-tests / tests / functional / rsend / send-c_mixed_compression.ksh
blob5bc2bb000b9cc71bcd5a1f8374c35131ac4f88ab
1 #!/usr/bin/ksh
4 # This file and its contents are supplied under the terms of the
5 # Common Development and Distribution License ("CDDL"), version 1.0.
6 # You may only use this file in accordance with the terms of version
7 # 1.0 of the CDDL.
9 # A full copy of the text of the CDDL should have accompanied this
10 # source. A copy of the CDDL is also available via the Internet at
11 # http://www.illumos.org/license/CDDL.
15 # Copyright (c) 2015 by Delphix. All rights reserved.
18 . $STF_SUITE/tests/functional/rsend/rsend.kshlib
19 . $STF_SUITE/include/properties.shlib
22 # Description:
23 # Verify datasets using mixed compression algorithms can be received.
25 # Strategy:
26 # 1. Write data with each of the available compression algorithms
27 # 2. Receive a full compressed send, and verify the data and compression ratios
30 verify_runnable "both"
32 log_assert "Verify datasets using mixed compression algorithms can be received."
33 log_onexit cleanup_pool $POOL2
35 send_ds=$POOL2/sendfs
36 recv_ds=$POOL2/recvfs
38 log_must zfs create $send_ds
40 for prop in "${compress_prop_vals[@]}"; do
41 log_must zfs set compress=$prop $send_ds
42 write_compressible $(get_prop mountpoint $send_ds) 16m
43 done
45 log_must zfs set compress=off $send_ds
46 log_must zfs snapshot $send_ds@full
47 log_must eval "zfs send -c $send_ds@full >$BACKDIR/full"
48 log_must eval "zfs recv $recv_ds <$BACKDIR/full"
50 verify_stream_size $BACKDIR/full $send_ds
51 verify_stream_size $BACKDIR/full $recv_ds
52 log_must cmp_ds_cont $send_ds $recv_ds
54 log_pass "Datasets using mixed compression algorithms can be received."