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 2007 Sun Microsystems, Inc.  All rights reserved.
  24 # Use is subject to license terms.
  25 #
  26 
  27 
  28 DESCRIPTION:
  29 
  30 The tests in this subdirectory verify nfslogd action with
  31 different log tag. test_nfslog.ksh is run on server to do the
  32 verification, optionally, it can do the following checks:
  33     - the location of the private file handle to path mapping
  34       database files.
  35     - the location of the private work buffer file.
  36     - the location of nfs log file and operations on test file
  37       are logged correctly in log file
  38 
  39 
  40 HOW TO ADD NEW TEST:
  41 
  42 The tests use dynamic assertion generation in STF, so it's very
  43 simple if you want to add new tests with other tags. Only need
  44 two steps:
  45     - add tag definition in nfslog.conf you want to test,
  46       specially, each tag is limited to one line as "awk" is used
  47       to do pattern match.
  48     - add corresponding log option to variable "Log_opts" in
  49       nfslogd.var.
  50 
  51 
  52 NOTES:
  53     - According to different tag definition, three files for
  54       verification described above are located in different
  55       subdirs under /var/nfs/smtest/.
  56     - All test cases are named by prefix "NFSLOGD" combining
  57       with different log tag option and nfs version option.
  58     - Currently, nfslogd only supports nfsv2/v3. In the future,
  59       we might have nfs server logging for version 4, in
  60       addition to adding "vers=4" to variable "VEROPTS",
  61       possibly we need to call test_nfslogd with different
  62       arguments if work buffer and file handle file are not
  63       needed. See the comments in test_nfslogd.ksh.
  64     - According to nfslogd test strategy, multiple tests can not
  65       run at the same time, so the suite creates three lock
  66       files to serialize all cases in all clients to run one by
  67       one. The lock files exist under /var/tmp/sharemnt_lock on
  68       server. The content of these lock files as follows:
  69 
  70     .stf_configure
  71         1 : First client is doing setup on server
  72         0 : The setup on server is finished, other clients
  73             needn't do it.
  74     .stf_execute
  75         0 : No case is running, any case can get the lock.
  76         pid : One case is running, other cases aren't allowed to
  77               run at same time.
  78     .stf_unconfigure
  79         referent count for clients, increase 1 per client. Only
  80         last client does cleanup when the value is 1.
  81