1*f67950b2SNasf-Fan#!/bin/ksh -p
2*f67950b2SNasf-Fan#
3*f67950b2SNasf-Fan# CDDL HEADER START
4*f67950b2SNasf-Fan#
5*f67950b2SNasf-Fan# The contents of this file are subject to the terms of the
6*f67950b2SNasf-Fan# Common Development and Distribution License (the "License").
7*f67950b2SNasf-Fan# You may not use this file except in compliance with the License.
8*f67950b2SNasf-Fan#
9*f67950b2SNasf-Fan# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*f67950b2SNasf-Fan# or http://www.opensolaris.org/os/licensing.
11*f67950b2SNasf-Fan# See the License for the specific language governing permissions
12*f67950b2SNasf-Fan# and limitations under the License.
13*f67950b2SNasf-Fan#
14*f67950b2SNasf-Fan# When distributing Covered Code, include this CDDL HEADER in each
15*f67950b2SNasf-Fan# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*f67950b2SNasf-Fan# If applicable, add the following below this CDDL HEADER, with the
17*f67950b2SNasf-Fan# fields enclosed by brackets "[]" replaced with your own identifying
18*f67950b2SNasf-Fan# information: Portions Copyright [yyyy] [name of copyright owner]
19*f67950b2SNasf-Fan#
20*f67950b2SNasf-Fan# CDDL HEADER END
21*f67950b2SNasf-Fan#
22*f67950b2SNasf-Fan
23*f67950b2SNasf-Fan#
24*f67950b2SNasf-Fan# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
25*f67950b2SNasf-Fan# Use is subject to license terms.
26*f67950b2SNasf-Fan#
27*f67950b2SNasf-Fan
28*f67950b2SNasf-Fan#
29*f67950b2SNasf-Fan# Copyright (c) 2017 by Fan Yong. All rights reserved.
30*f67950b2SNasf-Fan#
31*f67950b2SNasf-Fan
32*f67950b2SNasf-Fan. $STF_SUITE/tests/functional/projectquota/projectquota_common.kshlib
33*f67950b2SNasf-Fan
34*f67950b2SNasf-Fan#
35*f67950b2SNasf-Fan# DESCRIPTION:
36*f67950b2SNasf-Fan#	zfs get all <fs> does not print out project{obj}quota
37*f67950b2SNasf-Fan#
38*f67950b2SNasf-Fan# STRATEGY:
39*f67950b2SNasf-Fan#	1. set project{obj}quota to a fs
40*f67950b2SNasf-Fan#	2. check zfs get all fs
41*f67950b2SNasf-Fan#
42*f67950b2SNasf-Fan
43*f67950b2SNasf-Fanfunction cleanup
44*f67950b2SNasf-Fan{
45*f67950b2SNasf-Fan	log_must cleanup_projectquota
46*f67950b2SNasf-Fan}
47*f67950b2SNasf-Fan
48*f67950b2SNasf-Fanlog_onexit cleanup
49*f67950b2SNasf-Fan
50*f67950b2SNasf-Fanlog_assert "Check zfs get all will not print out project{obj}quota"
51*f67950b2SNasf-Fan
52*f67950b2SNasf-Fanlog_must zfs set projectquota@$PRJID1=50m $QFS
53*f67950b2SNasf-Fanlog_must zfs set projectobjquota@$PRJID2=100 $QFS
54*f67950b2SNasf-Fan
55*f67950b2SNasf-Fanlog_mustnot eval "zfs get all $QFS | grep projectquota"
56*f67950b2SNasf-Fanlog_mustnot eval "zfs get all $QFS | grep projectobjquota"
57*f67950b2SNasf-Fan
58*f67950b2SNasf-Fanlog_pass "zfs get all will not print out project{obj}quota"
59