xref: /freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/inheritance/README.state (revision 61145dc2b94f12f6a47344fb9aac702321880e43)
1# SPDX-License-Identifier: CDDL-1.0
2#
3# CDDL HEADER START
4#
5# The contents of this file are subject to the terms of the
6# Common Development and Distribution License (the "License").
7# You may not use this file except in compliance with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or https://opensource.org/licenses/CDDL-1.0.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22
23#
24# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
25# Use is subject to license terms.
26#
27#
28# For every configX.cfg file there must be a corresponding stateX.cfg
29# file. The state file both drives the operations to be performed on the
30# dataset hierarchy which has been specified by the corresponding
31# configX.cfg file, and also specifies the expected state of the
32# properties after the operation has been completed.
33#
34# The format of the file is:
35#       <target dataset>:<command>
36#       <property source before command>        <property src after command>
37#       <property source before command>        <property src after command>
38#       ....                                    ....
39#       ....                                    ....
40#
41# <target dataset> - dataset upon which the <command> is to be executed. Can
42#                    be any of the datasets specified in the corresponding
43#                    configX.cfg file. If no command is to be executed
44#                    then must be set to '-'
45#
46#
47# <command>        - command to be executed upon the specified dataset.
48#                    Currently the only supported commands are 'inherit'
49#                    or 'inherit -r'. If no command is to be executed,
50#                    then must be set to '-'.
51#
52# <property src before command>
53#                  - the 'source' (as reported in 'zfs get') for the
54#                    the properties before <command> is executed. This
55#                    can be 'default', 'local' or the name of a dataset
56#                    from which the property is inherited. (The code
57#                    automatically adds in the 'inherited from..' part
58#                    of the string when doing the check.
59#
60#                    This field is for informational purposes only, to
61#                    aid the user in seeing how the changes trickle down
62#                    the data hierarchy.
63#
64# <property src after command>
65#                  - the expected value of the 'source' field after the
66#                    <command> has been executed on the <target dataset>.
67#                    As above can be 'default', 'local', or the dataset
68#                    from which the property is inherited.
69#
70# Two important things to note:
71# 1) there must be a <property src..> line corresponding to each dataset
72#    line specified in the configX.cfg file.
73#
74#
75# 2) There can be as many <command>/<property src> blocks as desired, but
76#    there must be at least one, and the effect of each block is cumulative
77#    (i.e. the properties are not reset back to their default values between
78#    each block. If that is desired then each block must be placed in its
79#    own state file with its own corresponding configX.cfg file).
80#
81#
82# Below are two sample <command>/<property src> blocks.
83#
84# The first simply verifies that the properties on the top level dataset
85# were set locally, and that the middle and bottom datasets properties
86# were inherited from the top level pool (called TESTPOOL). Note the '-:-'
87# which means that no command is to be executed, but simply that the
88# properties settings are to be verified.
89#
90
91#
92# Copyright (c) 2013 by Delphix. All rights reserved.
93#
94
95-:-
96#
97local                           local
98TESTPOOL                        TESTPOOL
99TESTPOOL                        TESTPOOL
100#
101#
102# The block below describes the expected state of the properties after
103# an 'inherit -r' command has been run on the top level pool (called
104# TESTPOOL).
105#
106TESTPOOL:inherit -r
107#
108local				default
109TESTPOOL			default
110TESTPOOL			default
111