#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
#
#
# Copyright (c) 2012, 2016 by Delphix. All rights reserved.
#
#
# Description:
# Verify that if the checksum on the origin and clone is sha256, any compression
# algorithm enables nopwrite.
#
# Strategy:
# 1. Create an origin dataset with compression and sha256 checksum.
# 2. Write a 64M file into the origin dataset.
# 3. For each of 4 randomly chosen compression types:
# 3a. Create a snap and clone (inheriting the checksum property) of the origin.
# 3b. Apply the compression property to the clone.
# 3c. Write the same 64M of data into the file that exists in the clone.
# 3d. Verify that no new space was consumed.
#
verify_runnable "global"
function cleanup
{
}
log_assert "nopwrite works with sha256 and any compression algorithm"
# Verify nop_write for 4 random compression algorithms
for i in $(get_rand_compress 4); do
done
log_pass "nopwrite works with sha256 and any compression algorithm"