xref: /freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/alloc_class/alloc_class_011_neg.ksh (revision df58e8b1506f241670be86a560fb6e8432043aee)
1#!/bin/ksh -p
2# SPDX-License-Identifier: CDDL-1.0
3
4#
5# This file and its contents are supplied under the terms of the
6# Common Development and Distribution License ("CDDL"), version 1.0.
7# You may only use this file in accordance with the terms of version
8# 1.0 of the CDDL.
9#
10# A full copy of the text of the CDDL should have accompanied this
11# source.  A copy of the CDDL is also available via the Internet at
12# http://www.illumos.org/license/CDDL.
13#
14
15#
16# Copyright (c) 2017, Intel Corporation.
17# Copyright (c) 2018 by Delphix. All rights reserved.
18#
19
20. $STF_SUITE/tests/functional/alloc_class/alloc_class.kshlib
21
22#
23# DESCRIPTION:
24#	Setting the special_small_blocks property to invalid values fails.
25#	Only values between 0 and 16M including are allowed.
26#
27
28verify_runnable "global"
29
30claim="Setting the special_small_blocks property to invalid values fails."
31
32log_assert $claim
33log_onexit cleanup
34
35log_must disk_setup
36log_must zpool create $TESTPOOL raidz $ZPOOL_DISKS special mirror \
37	$CLASS_DISK0 $CLASS_DISK1
38
39for value in 16777217 33554432 4294967296
40do
41	log_mustnot zfs set special_small_blocks=$value $TESTPOOL
42done
43
44log_must zpool destroy -f "$TESTPOOL"
45log_pass $claim
46