Home | History | Annotate | Download | only in fnfs
      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	"@(#)README	1.8	08/12/10 SMI"
     27 #
     28 
     29 DESCRIPTION:
     30 ===========
     31   This test suite tests the new automounter in both kernel and the daemon.
     32 
     33 INSTALLATION:
     34 ============
     35   You can install the suite package, or install the suite source and
     36   build by yourself.
     37 
     38   1. Installing from Packages
     39 
     40     o In the majority of cases, the test suite can be installed from
     41       packages. To do that, you need to be as root. The package is
     42       called SUNWstc-nfs-fnfs and installs into "/opt" by default.
     43       Installation is via the standard Solaris package installation
     44       tool pkgadd(1M). To install SUNWstc-nfs-fnfs simply enter the
     45       following command line:
     46 
     47         # pkgadd -d <package location>  SUNWstc-nfs-fnfs
     48 
     49       Where <package location> refers to the path containing the
     50       SUNWstc-nfs-fnfs package directory.
     51 
     52       It is recommended that you install the package from scratch,
     53       rather than on top of an existing installation.  Thus, if an
     54       old version of the tests is installed:
     55 
     56         # pkgrm SUNWstc-nfs-fnfs
     57 
     58     o It is also acceptable to use an nfs accessible version of the
     59       SUNWstc-nfs-fnfs package.
     60 
     61   2. Installing the Test Suite Source
     62 
     63      You can install the suite source locally as any user.
     64 
     65 UNINSTALLATION:
     66 ==============
     67   Prior to uninstalling the test suite, you may want to run
     68   stf_unconfigure firstly. For more detail see UNCONFIGURATION.
     69 
     70   1. Uninstalling the Test Suite Package
     71 
     72      Use the standard Solaris package installation tool pkgrm(1M) to
     73      uninstall the package as root:
     74 
     75      # pkgrm SUNWstc-nfs-fnfs
     76 
     77   2. Uninstalling the Test Suite Source
     78 
     79      You can remove the corresponding directory.
     80 
     81 BUILDING:
     82 ========
     83   If the suite is installed from packages, you can skip this section.
     84   If the suite source is installed locally, maybe you need to build
     85   it. This method uses the standard STF techniques to create a Solaris
     86   package, which will be installed under the base directory
     87   "/opt/SUNWstc-nfs-fnfs".
     88 
     89   Briefly, this build and installation is performed as follows:
     90 
     91     # set path to STF bin directory
     92     % PATH=<path-to-STF>/bin/`uname -p`:$PATH
     93     % export PATH
     94 
     95     # WS_ROOT is the root of the STC workspace containing fnfs source code
     96     % cd <WS_ROOT>/usr/src/suites/nfs/fnfs
     97     % stf_build install
     98     % stf_build package
     99     % cd <WS_ROOT>/packages/`uname -p`
    100     % sudo pkgadd -d `pwd` SUNWstc-nfs-fnfs
    101 
    102 PREREQUISITES:
    103 =============
    104   This is a client test suite, but we will need a NFS server system and
    105   a filesystem from server to help testing the NFS mounting. Therefore,
    106   two systems are needed.
    107 
    108   Please prepare the followings before running the tests, otherwise
    109   tests may fail unexpectedly:
    110 
    111   1. Make sure STF Tools be in your PATH.
    112 
    113   2. Define following environment variables:
    114        % setenv SERVER your_remote_hostname_which_runs_nfsd->REQUIRED
    115 
    116      The following variables are optional, if not set, the default
    117 	  value (see config.vars) will be used:
    118        % setenv MNTPTR Path_for_$SERVER_to_export->OPTIONAL
    119        % setenv TMPDIR tmpdir_for_temp_files->OPTIONAL
    120 
    121   3. SERVER must be different from the local_host.
    122 
    123   4. You can define DNS_SERVER as your dns server, make sure the dns server
    124      is available before testing, the default value is jurassic.sfbay.sun.com
    125 
    126   5. Both systems under test (the SERVER and local_host) must be able to
    127      do rcp/rsh to each other as root (i.e. add + to ~root/.rhosts).
    128 
    129   6. The test suite requires "root" to run (for server setup and client
    130      map installation).  You can either run it as root, or enter the root
    131      password when it is prompted on command line when you do 'stf_configure'
    132      as a regular user.
    133 
    134   7. Trusted Extensions over a CIPSO connection
    135 
    136      If you want to test NFSv4 in Trusted Extensions over a CIPSO connection
    137      you MUST define the variable "ZONE_PATH" with <non-global zone path>
    138 
    139          example:
    140              % stf_configure -c "SERVER=myserver" -c "ZONE_PATH=/zone/public"
    141 
    142          This would produce the resultant MNTPTR default of:
    143              /zone/public/stc2_FNFS_$CLIENT
    144 
    145      The default for this ZONE_PATH is NULL.
    146 
    147 CONFIGURATION:
    148 =============
    149   You can choose one of the following ways to define the variables and
    150   configure your suite from the top level directory.
    151 
    152         1) define environment variables
    153            % export SERVER=myserver
    154            % stf_configure
    155 
    156         2) use '-c' option
    157            % stf_configure -c "SERVER=myserver" \
    158                 -c "DEBUG=ck_master:ck_mthome"
    159 
    160         3) use '-f' option
    161            % echo "export SERVER=myserver" > /tmp/varfile
    162            % stf_configure -f /tmp/varfile
    163 
    164 EXECUTION:
    165 =========
    166   At execution phase, you can only run 'stf_execute', or run stf_execute with
    167   '-c' option specifying other optional variables which will override those
    168   specified at configure phase.
    169 
    170   All results will be saved in the journal files located in the 'STF_RESULTS'
    171   directory; this directory defaults to /var/tmp/SUNWstc-nfs-fnfs/results
    172   when the test suite is executed from /opt/SUNWstc-nfs-fnfs.
    173 
    174 UNCONFIGURATION:
    175 ===============
    176   You can run stf_unconfigure from the top level directory.
    177   % stf_unconfigure 
    178 
    179 HOW TO TURN ON DEBUGGING:
    180 ========================
    181   1. To turn on one testcase's debug output, set the variable DEBUG with
    182      the testcase's name before running the test. For example:
    183        DEBUG=ck_cachefs01
    184   2. To turn on more than one testcase's debug output, use ":" to sepatate
    185      different testcase's name. For example:
    186        DEBUG=ck_cachefs01:ck_cachefs02
    187   3. To turn on the debug output of all testcase, set the variable DEBUG with
    188      "all". For example:
    189        DEBUG=all
    190 
    191 TEST DEVELOPMENT:
    192 ================
    193   If you develop new test case to this suite, you must:
    194   - name the new test starting with 'ck_'
    195 
    196 TEST STRUCTURE:
    197 ==============
    198   STF_TEST_SUITE--bin
    199                 |-doc
    200                 |-include
    201                 |-tests-----basic
    202                           |-misc
    203                           |-mntnet
    204                           |-mt
    205                           |-offset
    206                           |-others
    207                           |-readdir
    208 
    209 - Programs used by tests are put into STF_TEST_SUITE/bin
    210 - ksh script libs are put into STF_TEST_SUITE/include
    211 - test cases are grouped into directories below:
    212   - basic:   Test basic map formats
    213   - misc:    Test miscellaneous features that need to restart autofs service
    214   - mntnet:  Test features related to "-host" map
    215   - mt:      Test multi-thread features
    216   - offset:  Test maps using offset entries
    217   - others:  Test miscellaneous features that do NOT need to restart
    218              autofs service
    219   - readdir: Test readdir operation on miscellaneous maps
    220 
    221 - all maps setup for each subdir (except misc) are found in stf_setup/cleanup
    222   inside the subdir.
    223 
    224 NOTE:
    225 ====
    226 
    227   - Some tests depend heavily on the naming services (e.g. NIS+) and the
    228     automounter maps provided by the server.  Tests may fail with unstable
    229     naming services and if the maps are being changed at the time the tests
    230     are running or if there is any inconsistency between naming maps.
    231 
    232   - Tests may also fail if the network between the local system and SERVER
    233     is unstable.
    234 
    235     Please verify the failing tests by running them manually,
    236     e.g. "stf_execute -r ck_master".
    237 
    238   - Since the suite includes negative tests, there will be lots of messages
    239     printed from the console when those tests are executed.  If the tests
    240     pass, you can just ignore those messages.
    241 
    242 GOTCHAS:
    243 =======
    244   1. Tests ck_cachefs01 and ck_cachefs02 may fail with the following message:
    245 	 ck_cachefs01: FAILED
    246 		       2:stat(/ck_cachefs01_A/t1/.t1) failed : Permission denied
    247 
    248      and the console of the client shows:
    249 	 Jul  9 19:23:55 pulsanet1 cachefs: WARNING: CacheFS: not enough space
    250 	 to create sos3:_small_CFS_t1:_cfs_t1
    251 
    252      This is NOT a test bug, but a bug in ON/CacheFS.  See bugid 4090474 for
    253      more information and this bug has been closed as "WILL NOT FIX".
    254 
    255 **************************************************************************
    256