1*eda14cbcSMatt Macy#!/bin/ksh -p
2*eda14cbcSMatt Macy
3*eda14cbcSMatt Macy#
4*eda14cbcSMatt Macy# This file and its contents are supplied under the terms of the
5*eda14cbcSMatt Macy# Common Development and Distribution License ("CDDL"), version 1.0.
6*eda14cbcSMatt Macy# You may only use this file in accordance with the terms of version
7*eda14cbcSMatt Macy# 1.0 of the CDDL.
8*eda14cbcSMatt Macy#
9*eda14cbcSMatt Macy# A full copy of the text of the CDDL should have accompanied this
10*eda14cbcSMatt Macy# source.  A copy of the CDDL is also available via the Internet at
11*eda14cbcSMatt Macy# http://www.illumos.org/license/CDDL.
12*eda14cbcSMatt Macy#
13*eda14cbcSMatt Macy
14*eda14cbcSMatt Macy#
15*eda14cbcSMatt Macy# Copyright (c) 2017, Intel Corporation.
16*eda14cbcSMatt Macy# Copyright (c) 2018 by Delphix. All rights reserved.
17*eda14cbcSMatt Macy#
18*eda14cbcSMatt Macy
19*eda14cbcSMatt Macy. $STF_SUITE/tests/functional/alloc_class/alloc_class.kshlib
20*eda14cbcSMatt Macy
21*eda14cbcSMatt Macy#
22*eda14cbcSMatt Macy# DESCRIPTION:
23*eda14cbcSMatt Macy#	Creating a pool fails when an invalid special device type is specified.
24*eda14cbcSMatt Macy#
25*eda14cbcSMatt Macyclaim="Creating a pool with an invalid special device type fails."
26*eda14cbcSMatt Macy
27*eda14cbcSMatt Macyverify_runnable "global"
28*eda14cbcSMatt Macy
29*eda14cbcSMatt Macylog_assert $claim
30*eda14cbcSMatt Macylog_onexit cleanup
31*eda14cbcSMatt Macy
32*eda14cbcSMatt Macylog_must disk_setup
33*eda14cbcSMatt Macy
34*eda14cbcSMatt Macylog_mustnot zpool create $TESTPOOL raidz $ZPOOL_DISKS special $CLASS_DISK0
35*eda14cbcSMatt Macylog_mustnot display_status $TESTPOOL
36*eda14cbcSMatt Macylog_mustnot zpool destroy -f $TESTPOOL
37*eda14cbcSMatt Macy
38*eda14cbcSMatt Macylog_mustnot zpool create $TESTPOOL $ZPOOL_DISKS special mirror \
39*eda14cbcSMatt Macy    $CLASS_DISK0 $CLASS_DISK1
40*eda14cbcSMatt Macylog_mustnot display_status $TESTPOOL
41*eda14cbcSMatt Macylog_mustnot zpool destroy -f $TESTPOOL
42*eda14cbcSMatt Macy
43*eda14cbcSMatt Macylog_mustnot zpool create $TESTPOOL raidz $ZPOOL_DISKS special raidz \
44*eda14cbcSMatt Macy    $CLASS_DISK0 $CLASS_DISK1 $CLASS_DISK2
45*eda14cbcSMatt Macylog_mustnot display_status $TESTPOOL
46*eda14cbcSMatt Macylog_mustnot zpool destroy -f $TESTPOOL
47*eda14cbcSMatt Macy
48*eda14cbcSMatt Macylog_pass $claim
49