1 #! /usr/bin/ksh -p
   2 #
   3 # CDDL HEADER START
   4 #
   5 # The contents of this file are subject to the terms of the
   6 # Common Development and Distribution License (the "License").
   7 # You may not use this file except in compliance with the License.
   8 #
   9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10 # or http://www.opensolaris.org/os/licensing.
  11 # See the License for the specific language governing permissions
  12 # and limitations under the License.
  13 #
  14 # When distributing Covered Code, include this CDDL HEADER in each
  15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16 # If applicable, add the following below this CDDL HEADER, with the
  17 # fields enclosed by brackets "[]" replaced with your own identifying
  18 # information: Portions Copyright [yyyy] [name of copyright owner]
  19 #
  20 # CDDL HEADER END
  21 #
  22 
  23 #
  24 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  25 # Use is subject to license terms.
  26 #
  27 
  28 . ${STF_SUITE}/include/nfsgen.kshlib
  29 
  30 NAME=$(basename $0)
  31 CDIR=$(dirname $0)
  32 
  33 # Turn on debug info, if requested
  34 export _NFS_STF_DEBUG=$_NFS_STF_DEBUG:$NFSGEN_DEBUG
  35 [[ :$NFSGEN_DEBUG: = *:${NAME}:* || :${NFSGEN_DEBUG}: = *:all:* ]] \
  36        && set -x
  37 
  38 [[ $IS_KRB5 == 1 ]] && KOPT="-k $KPASSWORD" || KOPT=""
  39 
  40 echo "adding stress_pos001"
  41 if [[ -z $ZONE_PATH ]]; then
  42         stf_addassert -u root -t stress_pos001 -c chg_usr_exec \
  43                 "$KOPT $TUSER01 stress_pos001 -T \$ST01_RUNS -Q \$ST01_NAP \
  44                 -I \$ST01_ITER -f ${MNTDIR}/$$.stress_pos001 -d \$STRESS_DEBUG"
  45 else
  46         stf_addassert -u root -t stress_pos001 -c stress_pos001 \
  47                 "-T \$ST01_RUNS -Q \$ST01_NAP -I \$ST01_ITER \
  48                 -f ${MNTDIR}/$$.stress_pos001 -d \$STRESS_DEBUG"
  49 fi
  50 
  51 echo "adding stress_pos002"
  52 if [[ -z $ZONE_PATH ]]; then
  53         stf_addassert -u root -t stress_pos002 -c chg_usr_exec \
  54                 "$KOPT $TUSER01 stress_pos002 -b ${MNTDIR} -n \${ST02_FNUM} \
  55                 -W \${ST02_NAP} -d \$STRESS_DEBUG"
  56 else
  57         stf_addassert -u root -t stress_pos002 -c stress_pos002 \
  58                 "-b ${MNTDIR} -n \${ST02_FNUM} -W \${ST02_NAP} -d \$STRESS_DEBUG"
  59 fi
  60 
  61 echo "adding stress_pos003{a}"
  62 stf_addassert -u root -t stress_pos003{a} -c stress_pos003 \
  63         "-S 1 -b ${MNTDIR} -n 128 -W 1 -d \$STRESS_DEBUG"
  64 
  65 echo "adding stress_pos003{b}"
  66 stf_addassert -u root -t stress_pos003{b} -c stress_pos003 \
  67         "-S 2 -b ${MNTDIR} -n 512 -d \$STRESS_DEBUG"
  68 
  69 echo "adding stress_pos003{c}"
  70 stf_addassert -u root -t stress_pos003{c} -c stress_pos003 \
  71         "-S 4 -b ${MNTDIR} -n 512 -d \$STRESS_DEBUG"
  72 
  73 #  Solaris doesn't support the negative seek with fcntl(2) for NFS;
  74 #  so this assertion is now commented out.
  75 #echo "adding stress_pos003{d}"
  76 #stf_addassert -u root -t stress_pos003{d} -c stress_pos003 \
  77 #       "-S 3 -b ${MNTDIR} -n 512 -d \$STRESS_DEBUG"
  78 
  79 exit 0