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 # make sure we get the new vars from configure
  29 [[ -f $STF_CONFIG/stf_config.suite ]] && . $STF_CONFIG/stf_config.suite
  30 
  31 # The share options array for test combination generation
  32 # Note: There should be NO conflict options and
  33 #       sec= option must go before rw,ro
  34 #
  35 SHROPTS_LIST="sec=sys ro anon=0 public"
  36 if [[ -n $SHROPTS ]]; then
  37         ret=0
  38         for opt in $SHROPTS; do
  39                 echo $SHROPTS_LIST | grep -w $opt > /dev/null 2>&1
  40                 if (( $? != 0 )); then
  41                         ret=1
  42                         break
  43                 fi
  44         done
  45         (( $ret != 0 )) && unset SHROPTS
  46 else
  47         SHROPTS=$SHROPTS_LIST
  48 fi
  49 
  50 # The mount options array for test combination generation
  51 MNTOPTS_LIST="sec=sys ro noac proto=tcp proto=udp proto=rdma public"
  52 if [[ -n $MNTOPTS ]]; then
  53         ret=0
  54         for opt in $MNTOPTS; do
  55                 echo $MNTOPTS_LIST | grep -w $opt > /dev/null 2>&1
  56                 if (( $? != 0 )); then
  57                         ret=1
  58                         break
  59                 fi
  60         done
  61         (( $ret != 0 )) && unset MNTOPTS
  62 else
  63         MNTOPTS=$MNTOPTS_LIST
  64 fi
  65 
  66 # The NFS version options array for test combination generation
  67 #
  68 VEROPTS_LIST="default vers=4 vers=3 vers=2"
  69 if [[ -n $VEROPTS ]]; then
  70         ret=0
  71         for opt in $VEROPTS; do
  72                 echo $VEROPTS_LIST | grep -w $opt > /dev/null 2>&1
  73                 if (( $? != 0 )); then
  74                         ret=1
  75                         break
  76                 fi
  77         done
  78         (( $ret != 0 )) && unset VEROPTS
  79 else
  80         VEROPTS=$VEROPTS_LIST
  81 fi
  82 
  83 STF_VARIABLES="SHROPTS_LIST MNTOPTS_LIST VEROPTS_LIST SHROPTS MNTOPTS VEROPTS"