Home | History | Annotate | only in /test/stcnv/usr/src/suites/nfs/sharemnt
Up to higher level directory
NameDateSize
bin/09-Sep-2009
checkenv_def09-Sep-20091.8K
cleanup.ksh17-Jun-20091.9K
config.vars09-Sep-20092.3K
configure.ksh09-Sep-200911.6K
include/09-Sep-2009
Makefile17-Jun-20091.3K
pkgdef/09-Sep-2009
README09-Sep-200913.9K
setup.ksh09-Sep-20091.5K
srv_setup.ksh09-Sep-20099.8K
STC.INFO09-Sep-20094.1K
STF.INFO17-Jun-20091,016
tests/17-Jun-2009
unconfigure.ksh09-Sep-20095.1K

README

      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 # ident	"@(#)README	1.20	09/08/23 SMI"
     27 #
     28 
     29 DESCRIPTION:
     30 ===========
     31   This is the 'sharemnt' test suite which consists of tests for
     32   share_nfs(1M), mount_nfs(1M), sharemgr(1M) and "zfs set sharenfs".
     33 
     34 
     35 INSTALLATION:
     36 ============
     37   You can install the suite package, or install the suite source and
     38   build by yourself.
     39 
     40   1. Installing from Packages
     41 
     42     o In the majority of cases, the test suite can be installed from
     43       packages. To do that, you need to be as root. The package is
     44       called SUNWstc-nfs-sharemnt and installs into "/opt" by default.
     45       Installation is via the standard Solaris package installation
     46       tool pkgadd(1M). To install SUNWstc-nfs-sharemnt simply enter the
     47       following command line:
     48 
     49         # pkgadd -d <package location> SUNWstc-nfs-sharemnt
     50 
     51       Where <package location> refers to the path containing the
     52       SUNWstc-nfs-sharemnt package directory.
     53 
     54       It is recommended that you install the packages from scratch,
     55       rather than on top of an existing installation.  Thus, if an
     56       old version of the tests is installed:
     57 
     58         # pkgrm SUNWstc-nfs-sharemnt
     59 
     60     o It is also acceptable to use an nfs accessible version of the
     61       SUNWstc-nfs-sharemnt package.
     62 
     63   2. Installing the Test Suite Source
     64 
     65      You can install the suite source locally as any user.
     66 
     67 
     68 UNINSTALLATION:
     69 ==============
     70   Prior to uninstalling the test suite, you may want to run
     71   stf_unconfigure first. For more detail see UNCONFIGURATION.
     72 
     73   1. Uninstalling the Test Suite Package
     74 
     75      Use the standard Solaris package installation tool pkgrm(1M) to
     76      uninstall the package as root:
     77 
     78      # pkgrm SUNWstc-nfs-sharemnt
     79 
     80   2. Uninstalling the Test Suite Source
     81 
     82      You can remove the corresponding directory.
     83 
     84 
     85 BUILDING:
     86 ========
     87   If the suite is installed from packages, you can skip this section.
     88   If the suite source is installed locally, maybe you need to build
     89   it. This method uses the standard STF techniques to create a Solaris
     90   package, which will be installed under the base directory
     91   "/opt/SUNWstc-nfs-sharemnt".
     92 
     93   Briefly, this build and installation is performed as follows:
     94 
     95     # set path to STF bin directory
     96     $ PATH=<path-to-STF>/bin/`uname -p`:$PATH
     97     $ export PATH
     98 
     99     # WS_ROOT is the root of the STC workspace containing sharemnt source code
    100     $ cd <WS_ROOT>/usr/src/suites/nfs/sharemnt
    101     $ stf_build package
    102     $ cd <WS_ROOT>/packages/`uname -p`
    103     $ sudo pkgadd -d `pwd` SUNWstc-nfs-sharemnt
    104 
    105 
    106 PREREQUISITES:
    107 =============
    108   The suite runs in remote networking mode. You need to prepare
    109   two systems to run all tests. One is the local host where the
    110   tests are run and the other one is the remote system acting as
    111   the NFS SERVER.
    112 
    113   Also, please do the followings before running the tests:
    114 
    115   1. Make sure STF and STC genutils Tools be in your PATH.
    116 
    117      You can use either a local installation of the SUNWstc-stf and
    118      SUNWstc-genutils packages:
    119 
    120      $ PATH=$PATH:/opt/SUNWstc-stf/bin/$(isainfo -n)
    121      $ PATH=$PATH:/opt/SUNWstc-genutils/bin
    122      $ export PATH
    123 
    124      or a remote, NFS-mounted location of the tools, for example:
    125 
    126      $ PATH=$PATH:/ws/stcnv-gate/proto/tools/stf/bin/$(isainfo -n)
    127      $ PATH=$PATH:/ws/stcnv-gate/proto/tools/genutils/bin
    128      $ export PATH
    129 
    130      or the tools you build in your own workspace, for example:
    131 
    132      $ PATH=$PATH:<WS_ROOT>/proto/tools/stf/bin/$(isainfo -n)
    133      $ PATH=$PATH:<WS_ROOT>/proto/tools/genutils/bin
    134      $ export PATH
    135 
    136      Please note that if the STC genutils tool could not be accessed by
    137      NFS path, it is required to install SUNWstc-genutils package to the
    138      same path on all systems participating in test.
    139 
    140   2. MUST define environment variable "SERVER".
    141 
    142      SERVER is for your server's hostname.
    143 
    144   3. The suite requires the "root" password to setup the server.
    145      Run 'stf_configure' as a non-root user and enter the root
    146      password when prompted for it.
    147 
    148   4. All systems under testing (including the local system) must
    149      enable r* service (i.e. run the command "netservices open")
    150      and be able to do rcp/rsh to each other as root; (i.e. add
    151      "local_host_name root" to ~root/.rhosts on server).
    152 
    153   5. You can define the following optional variables, if not set,
    154      the default value (see config.vars file) will be used.
    155 
    156         NFSSHRDIR - the direcotry exported in server
    157         NFSMNTDIR - path for localhost to mount
    158         SHAREMNT_DEBUG - debug variable
    159             There are two ways to turn debug on:
    160             1) export SHAREMNT_DEBUG=<value>; stf_execute ...
    161             2) stf_execute -c SHAREMNT_DEBUG=<value> ...
    162 
    163             SHAREMNT_DEBUG can be set to the following <value>
    164             1) "all" for the whole suite,
    165             2) "RSH" for debug RSH and all scripts executed on server,
    166             3) the name of the case file you want to debug (e.g. runtests),
    167             4) name of function in tools/genutils/include (e.g. wait_now),
    168             5) name of function in include/sharemnt.kshlib (e.g. share_check),
    169             6) combination of 2-5, separated by ":".
    170 
    171             For example:
    172             1) turn debug on for the whole suite at runtime
    173                $ stf_execute -c SHAREMNT_DEBUG=all
    174             2) turn debug on in function share_check() and RSH()
    175                $ export SHAREMNT_DEBUG=share_check:RSH; stf_execute -m i386
    176 
    177         TESTGRP - testing group used by sharemgr
    178 
    179   6. Trusted Extensions over a CIPSO connection
    180 
    181      If you want to test NFS in Trusted Extensions over a CIPSO
    182      connection you MUST define the variable "ZONE_PATH" with
    183      <non-global zone path>
    184 
    185      Example:
    186         $ stf_configure -c "SERVER=myserver" \
    187                         -c "ZONE_PATH=/zone/public"
    188 
    189      This will produce the resultant NFSSHRDIR default of:
    190              /zone/public/TESTDIR_shmnt
    191      And will produce the resultant NFSMNTDIR default of:
    192              /zone/public/MNTDIR_shmnt
    193 
    194      The default for ZONE_PATH is NULL.
    195 
    196      NOTE: Only NFSv3 and NFSv4 are supported under Trusted Extensions.
    197 
    198   7. For stress test, by default, we only share 2000 entries on
    199      the server.  You can reset the number with the variable
    200      "NUM_SHARES".
    201 
    202      If the expected time of sharing $NUM_SHARES entries exceeds
    203      2 hours, you SHOULD reset the variable "STRESS_TIMEOUT"
    204      with your expected time. Eg. if you want to share 40000
    205      entries, and expected time is less than 3 hours, you can set
    206      with following configuration:
    207 
    208         $ stf_configure -c "SERVER=myserver" -c "NUM_SHARES=40000"\
    209                         -c "STRESS_TIMEOUT=10800"
    210 
    211      For sharemgr group stress test, by default, we create 100 groups,
    212      with 5 entries in each group.  You can reset the number
    213      with the variables "NUM_GROUPS" and "NUM_ENTRYS". Eg.
    214      if you want to create 200 groups, with 10 entries in each
    215      group, and expected time is less than 3 hours, you can set
    216      with following configuration:
    217 
    218         $ stf_configure -c "SERVER=myserver" -c "NUM_GROUPS=200"\
    219                         -c "NUM_ENTRYS=10" -c "STRESS_TIMEOUT=10800"
    220 
    221   8. For multiple clients tests. If you want to run this suite on
    222      multiple clients with the same SERVER simultaneously, please
    223      note the followings:
    224      - stress test does not support it.
    225      - krb5 test does not support it.
    226      - ZFS test does not support it.
    227      - NFSSHRDIR, NFSMNTDIR, ZONE_PATH MUST be set as same for
    228        nfslogd test.
    229 
    230   9. For krb5 tests. STC krb5tools are required, they can be found in the
    231      STC genutils tool, see more details in its README.
    232 
    233      For using krb5tools, please make sure these packages are installed
    234      or the related commands are available on your test systems:
    235      - SUNWkdcr: Kerberos V5 KDC (root)
    236      - SUNWkdcu: Kerberos V5 Master KDC (user)
    237      - SUNWkrbr: Kerberos version 5 support (Root)
    238      - SUNWkrbu: Kerberos version 5 support (Usr)
    239 
    240      The krb5 tests also use three other env variables: DNS_DOMAIN,
    241      SRV_DNS_DOMAIN, DNS_SERVER:
    242 
    243      DNS_DOMAIN     - client dns domain. Default value is
    244                       sfbay.sun.com.
    245      SRV_DNS_DOMAIN - server dns domain. By default it has
    246                       the same value as DNS_DOMAIN. User need
    247                       to set it if server has a different
    248                       DNS domain than client.
    249      DNS_SERVER     - a dns server that can resolve client
    250                       and server's dns names.
    251 
    252      Notes: DNS_DOMAIN and SRV_DNS_DOMAIN is used to construct
    253      full qualified domain name for client and server, so they
    254      cannot be, for example, "sun.com", instead they should
    255      be "sfbay.sun.com", "ireland.sun.com", etc. BTW, although
    256      test scripts can get client and server's full qualified
    257      domain name automatially from dns sever, that requires
    258      reverse dns lookup has been set up for machines being
    259      queried, which is not always true for lab machines.
    260 
    261  10. For sharetab tests. One case needs reboot the server, to run
    262      it, please set env variable SHRTAB_REBOOT as TRUE. The
    263      default value is FALSE, this case will be UNTEST.
    264 
    265  11. If both client and server are setup with RDMA connection and you
    266      want to run the tests with NFS/RDMA, set the following variable
    267      before configuration:
    268         $ export TESTRDMA=yes     (default TESTRDMA=no)
    269 
    270      The "proto=rdma" option will be added to the mount options of the
    271      "basic" and "krb5/basic" subdirs, if TESTRMDA=yes.
    272 
    273  12. With more share/mount options are added to basic subdir, its test
    274      assertion list becomes bigger, so it takes more time to run basic
    275      tests. If time is in pressure, user can choose what to run by picking
    276      the option combinations from the default selectable lists(please
    277      see SHROPTS_LIST, MNTOPTS_LIST and VEROPTS_LIST defined in
    278      basic/basic.vars). Note: other options beyond the relative list
    279      are not allowed.
    280 
    281      For example, set the following variables before configuration:
    282 
    283         $ export SHROPTS="rw public"      (default SHROPTS=SHROPTS_LIST)
    284         $ export MNTOPTS="ro proto=tcp"   (default MNTOPTS=MNTOPTS_LIST)
    285         $ export VEROPTS="vers=4 vers=2"  (default VEROPTS=VEROPTS_LIST)
    286 
    287      In addition, for saving the time of execution, it is strongly
    288      suggested to install and use STF tools locally.
    289 
    290  13. By default, krb5/basic will not test public option, if you want
    291      to run krb5 tests with public option, set the following variable
    292      before configuration:
    293 
    294         $ export KRB5_PUBLIC=yes          (default KRB5_PUBLIC=no)
    295 
    296      And if you want to limit the NFS version tests to default, v4,
    297      v3, or v2 or combination of these, set the following variable
    298      before configuration, e.g. to default and v3, do:
    299 
    300         $ export KRB5_VERS="null 3"       (default KRB5_VERS="null 4 3 2")
    301 
    302      Both variables must be set BEFORE or at "stf_configure" to generate
    303      the correct set of tests, for example:
    304 
    305 	$ export KRB5_VERS="null" ; stf_configure
    306      or $ stf_configure -c KRB5_VERS=4 -c KRB5_PUBLIC=yes
    307 
    308  14. To test options quota/noquota of mount_nfs(1M) in misc_opts, if NFSSHRDIR
    309      is based on UFS, they will be setup using LOFI (but NOTE that the LOFI
    310      setup will be lost if you reboot the SERVER). Tests covered quota/noquota
    311      options may fail expectedly if LOFI setup is gone.
    312 
    313 
    314 CONFIGURATION:
    315 =============
    316   You can choose one of the following ways to define the variables
    317   and configure your suite from the top level directory.
    318 
    319         1) define environment variables
    320            $ export SERVER=myserver
    321            $ stf_configure
    322 
    323         2) use '-c" option
    324            $ stf_configure -c "SERVER=myserver" \
    325                 -c "SHAREMNT_DEBUG=configure"
    326 
    327         3) use '-f' option
    328            $ echo "export SERVER=myserver" > /tmp/varfile
    329            $ stf_configure -f /tmp/varfile
    330 
    331 
    332 EXECUTION:
    333 =========
    334   At execution phase, you can run 'stf_execute' by itself, or run
    335   'stf_execute -c' specifying optional variables which will override
    336   those specified in the configure phase.
    337 
    338   All results will be saved in journal files under the 'STF_RESULTS'
    339   directory; this directory defaults to
    340         /var/tmp/SUNWstc-nfs-sharemnt/results
    341   when the test suite is executed from /opt/SUNWstc-nfs-sharemnt
    342 
    343 
    344 UNCONFIGURATION:
    345 ===============
    346   You can run 'stf_unconfigure' from the top level directory.
    347      $ stf_unconfigure
    348 
    349   Please note that in order to run tests after unconfiguration,
    350   'stf_configure' must first be invoked to reconfigure the test
    351   suite before running 'stf_execute'.
    352 
    353 
    354 TEST STRUCTURE:
    355 ==============
    356   STF_TEST_SUITE--include
    357                 |-tests-----basic
    358                           |-krb5
    359                           |-nfslogd
    360                           |-others
    361                           |-sharetab
    362                           |-stress
    363 
    364  - ksh script libs are put into STF_TEST_SUITE/include
    365  - test cases are grouped into 6 directories so far, more will
    366    be added in the later phases as needed:
    367         - basic: the basic share_nfs/mount_nfs options
    368         - krb5: share and mount with sec=krb5* options
    369         - nfslogd: tests include log option with different tag
    370         - others: tests require specific system configuration
    371                   and regression tests for the bugs found/fixed
    372                   sharemgr
    373         - sharetab: in-kernel sharetab test
    374         - stress: stress test
    375