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 2009 Sun Microsystems, Inc. All rights reserved. 24 # Use is subject to license terms. 25 # 26 27 The SMF Test Suite README 28 29 30 CONTENTS 31 32 1. Building & Installation 33 1.1 Installing from Packages 34 1.2 Uninstalling the Test Suite Package 35 1.3 Building the Test Suite (optional) 36 1.4 System Requirements 37 2. Running the tests 38 2.1 Configuring and running the tests 39 3. Unconfigure the suite 40 4. Special requirements 41 4.1 Zones Test 42 43 44 45 ================================================================================ 46 47 1. Building & Installation 48 49 1.1 Installing from Packages 50 51 o In the majority of cases, the test suite can be installed from 52 packages. The package is called system-test-smf and its default 53 installation directory is /opt/smf-tests. Installation is via 54 the standard Solaris package installation tool pkgadd(1m). 55 56 To install system-test-smf simply use platform pkg tools. 57 58 o It is recommended that you install the packages from scratch, rather 59 than on top of an existing installation. 60 61 1.2 Uninstalling the Test Suite Package 62 63 o Prior to uninstalling the system-test-smf package, you may want to 64 run stf_unconfigure from the top level directory. Typically, this 65 will be "/opt/smf-tests". Unconfiguring the test suite is 66 recommended if you have previously run the suite, and especially so, 67 if you have run the test suite in non-global zones. For more detail 68 on how to unconfigure the suite see section 3.1. 69 70 o To uninstall the package, use the platform pkg tool 71 72 1.3 Building the Test Suite (optional) 73 74 o This method uses the standard STF techniques to create a Solaris 75 package, which will be installed under the base directory 76 "/opt/smf-tests". 77 78 Briefly, this build and installation is performed as follows: 79 80 # set path to STF bin directory 81 % PATH=<path-to-STF>/bin/`uname -p`:$PATH 82 % export PATH 83 84 # WS_ROOT is the root of the workspace containing the 85 # SMF test suite source code 86 # 87 % cd <WS_ROOT>/usr/src/test/smf-tests 88 % stf_build package 89 % cd <WS_ROOT>/packages/`uname -p` 90 91 1.4 System Requirements 92 93 o Beginning with version 1.7 of this test suite, snv_102 or greater is 94 required to successfully build and execute all tests. 95 96 ================================================================================ 97 98 2. Running the tests 99 100 2.1 Configuring and running the tests 101 102 2.1.1 Configure the tests 103 104 o Configuration of the test suite is completed with the stf_configure 105 command. 106 107 % cd /opt/smf-tests; stf_configure 108 109 o For stf_configure options refer to the STF User's Guide. 110 111 2.1.2 Run the tests 112 113 o To execute all of the modes on current system platform: 114 115 % cd /opt/smf-tests; stf_execute 116 117 o To execute only test cases in a specific directory: 118 119 % cd /opt/smf-tests/<test directory>; stf_execute 120 121 o For other stf_execute options, refer to the STF User's Guide. 122 123 ================================================================================ 124 125 3. Unconfigure the suite. 126 127 o Use the STF unconfigure tool. 128 129 % cd /opt/smf-tests; stf_unconfigure 130 131 ================================================================================ 132 133 4. Special Requirements 134 135 4.1 Zones test 136 o This suite includes a zones test to verify SMF services are properly 137 handled in non-global zones. The test requires the Solaris package 138 management scripts (pkgadd, pkgrm etc) and will not work with the IPS 139 packaging mechanism.