1 # 2 # CDDL HEADER START 3 # 4 # The contents of this file are subject to the terms of the 5 # Common Development and Distribution License (the "License"). 6 # You may not use this file except in compliance with the License. 7 # 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 # or http://www.opensolaris.org/os/licensing. 10 # See the License for the specific language governing permissions 11 # and limitations under the License. 12 # 13 # When distributing Covered Code, include this CDDL HEADER in each 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 # If applicable, add the following below this CDDL HEADER, with the 16 # fields enclosed by brackets "[]" replaced with your own identifying 17 # information: Portions Copyright [yyyy] [name of copyright owner] 18 # 19 # CDDL HEADER END 20 # 21 22 # 23 # Copyright 2008 Sun Microsystems, Inc. All rights reserved. 24 # Use is subject to license terms. 25 # 26 # ident "@(#)ASSERTIONS 1.2 08/05/22 SMI" 27 # 28 29 ASSERTION: smf_disable_instance_001 30 31 DESCRIPTION: 32 smf_disable_instance() returns -1 and sets error code to 33 SCF_ERROR_INVALID_ARGUMENT 34 when the instance is NULL. 35 36 STATUS: COMPLETED (2003-11-25) 37 38 COMMENTS: 39 May need to be disabled if NULL is not detected by the library 40 --- 41 42 ASSERTION: smf_disable_instance_002 43 44 DESCRIPTION: 45 smf_disable_instance() returns -1 and sets error code to 46 SCF_ERROR_INVALID_ARGUMENT 47 when the instance is not a valid FMRI. 48 49 STATUS: COMPLETED (2003-11-25) 50 51 COMMENTS: 52 --- 53 54 ASSERTION: smf_disable_instance_003 55 56 DESCRIPTION: 57 smf_disable_instance() returns -1 and sets error code to 58 SCF_ERROR_NOT_FOUND 59 when the instance is valid but does not exist 60 61 STATUS: COMPLETED (2003-11-25) 62 63 COMMENTS: 64 --- 65 66 ASSERTION: smf_disable_instance_004 67 68 DESCRIPTION: 69 smf_disable_instance() returns 0, success for enabled instance 70 71 STATUS: COMPLETED (2003-11-25) 72 73 COMMENTS: 74 --- 75 76 ASSERTION: smf_disable_instance_005 77 78 DESCRIPTION: 79 smf_disable_instance() returns -1 and sets error code to 80 SCF_ERROR_NO_MEMORY when there is no memory available 81 when the call is made 82 83 STATUS: COMPLETED (2003-11-25) 84 85 COMMENTS: 86 --- 87 88 ASSERTION: smf_disable_instance_006 89 90 DESCRIPTION: 91 smf_disable_instance() returns -1 and sets error code to 92 SCF_ERROR_NO_RESOURCES when there are no resources available 93 when the call is made 94 95 STRATEGY: 96 TODO: determine how to create no resources condition 97 1. Set a string pointer to a valid fmri string for an instance 98 2. Invoke smf_enable_instance() with above pointer to enable 99 the instance 100 3. Expect the call to return 0 101 4. Do something that makes resources unavailable 102 5. Invoke smf_disable_instance() with above pointer 103 6. Expect the call to return -1 and expect error code 104 SCF_ERROR_NO_RESOURCES 105 106 TESTABILITY: implicit 107 108 AUTHOR: rajesh.bagayatkar@sun.com 109 110 APPROVALS/REVIEWERS: chris.schmechel@sun.com 111 tobin.coziahr@sun.com 112 cheryl.huntington@sun.com 113 114 STATUS: IN_PROGRESS (2003-11-25) 115 116 COMMENTS: 117 Needs addtional strategy planning 118 --- 119 120 ASSERTION: smf_disable_instance_007 121 122 DESCRIPTION: 123 smf_disable_instance() returns -1 and sets error code to 124 SCF_ERROR_CONNECTION_BROKEN when the connection to the 125 repository is broken during the call 126 127 STRATEGY: 128 TODO: determine how to create broken connection condition 129 1. Set a string pointer to a valid fmri string for an instance 130 2. Invoke smf_enable_instance() with above pointer to enable 131 the instance 132 3. Expect the call to return 0 133 4. Do something that causes the connection to ?? to be broken 134 5. Invoke smf_disable_instance() with above pointer 135 6. Expect the call to return -1 and expect error code 136 SCF_ERROR_CONNECTION_BROKEN 137 138 TESTABILITY: implicit 139 140 AUTHOR: rajesh.bagayatkar@sun.com 141 142 APPROVALS/REVIEWERS: chris.schmechel@sun.com 143 tobin.coziahr@sun.com 144 cheryl.huntington@sun.com 145 146 STATUS: IN_PROGRESS (2003-11-25) 147 148 COMMENTS: 149 Needs addtional strategy planning 150 --- 151 152 ASSERTION: smf_disable_instance_008 153 154 DESCRIPTION: 155 smf_disable_instance() returns 0, success when called with 156 an instance that is already disabled 157 158 STATUS: COMPLETED (2003-11-25) 159 160 COMMENTS: 161 --- 162 163 ASSERTION: smf_disable_instance_009 164 165 DESCRIPTION: 166 smf_disable_instance() returns 0, success when the instance 167 is enabled and disabled multiple times 168 169 STATUS: COMPLETED (2003-11-25) 170 171 COMMENTS: 172 --- 173