common.zsh: Pull out common test config into a shared file
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
parent
59d2891198
commit
f757dec0ab
|
@ -0,0 +1,30 @@
|
|||
#!/bin/zsh
|
||||
##############################
|
||||
# #
|
||||
# NFS client configuration #
|
||||
# #
|
||||
##############################
|
||||
CLIENT=(client)
|
||||
MOUNTPOINT=(/mnt/test)
|
||||
SCRATCHMNT=(/mnt/scratch)
|
||||
|
||||
|
||||
##############################
|
||||
# #
|
||||
# NFS server configuration #
|
||||
# #
|
||||
##############################
|
||||
SERVER=(server)
|
||||
EXPORT=(/srv/xfs/test)
|
||||
SCRATCH=(/srv/xfs/scratch)
|
||||
|
||||
|
||||
###########################
|
||||
# #
|
||||
# General configuration #
|
||||
# #
|
||||
###########################
|
||||
BIN=$HOME/bin
|
||||
USER=$(whoami)
|
||||
VERSION=(3 4.0 4.1 4.2)
|
||||
PROTO=(tcp)
|
|
@ -1,8 +1,5 @@
|
|||
#!/bin/zsh -e
|
||||
CLIENT=(client)
|
||||
SERVER=(server)
|
||||
EXPORT=(/srv/test)
|
||||
MOUNTPOINT=(/mnt/test)
|
||||
source common.zsh
|
||||
|
||||
zparseopts -F -K \
|
||||
c:=CLIENT -client:=CLIENT \
|
||||
|
@ -14,10 +11,8 @@ zparseopts -F -K \
|
|||
s:=SERVER -server:=SERVER \
|
||||
x:=EXPORT -export:=EXPORT
|
||||
|
||||
BIN=$HOME/bin
|
||||
COLOR=$BIN/colors/cthon.py
|
||||
RUN_CTHON="cd cthon04 && sudo ./runcthon"
|
||||
USER=$(whoami)
|
||||
|
||||
#
|
||||
# Prepare to test
|
||||
|
|
|
@ -1,19 +1,22 @@
|
|||
#!/bin/zsh -e
|
||||
CLIENT=(client)
|
||||
SERVER=(server)
|
||||
EXPORT=(/srv/test)
|
||||
MOUNTPOINT=(/mnt/test/)
|
||||
source common.zsh
|
||||
|
||||
zparseopts -F -K \
|
||||
c:=CLIENT -client:=CLIENT \
|
||||
-dmesg=DMESG -srvdmesg=SRVDMESG \
|
||||
p:=MOUNTPOINT -mountpoint:=MOUNTPOINT \
|
||||
s:=SERVER -server:=SERVER \
|
||||
x:=EXPORT -export:=EXPORT
|
||||
|
||||
BIN=$HOME/bin
|
||||
USER=$(whoami)
|
||||
RUN_NFSTEST="run-nfstest-rplus.zsh"
|
||||
|
||||
if [ ${#DMESG} -gt 0 ]; then
|
||||
ssh ${CLIENT[-1]} "sudo dmesg --clear"
|
||||
fi
|
||||
if [ ${#SRVDMESG} -gt 0 ]; then
|
||||
ssh ${SERVER[-1]} "sudo dmesg --clear"
|
||||
fi
|
||||
|
||||
#
|
||||
# Prepare to test
|
||||
#
|
||||
|
@ -26,8 +29,18 @@ echo
|
|||
#
|
||||
# Run tests
|
||||
#
|
||||
#
|
||||
set +e
|
||||
ssh -t ${CLIENT[-1]} "$RUN_NFSTEST --server ${SERVER[-1]} \
|
||||
--export ${EXPORT[-1]} \
|
||||
--mountpoint ${MOUNTPOINT[-1]} \
|
||||
--user $USER"
|
||||
ret=$?
|
||||
|
||||
if [ ${#DMESG} -gt 0 ]; then
|
||||
ssh ${CLIENT[-1]} "sudo dmesg --color=always"
|
||||
fi
|
||||
if [ ${#SRVDMESG} -gt 0 ]; then
|
||||
ssh ${SERVER[-1]} "sudo dmesg --color=always"
|
||||
fi
|
||||
|
||||
exit $ret
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
#!/bin/zsh -e
|
||||
CLIENT=(client)
|
||||
SERVER=(server)
|
||||
EXPORT=(/srv/test)
|
||||
MOUNTPOINT=(/mnt/test)
|
||||
source common.zsh
|
||||
SIZE=(2048)
|
||||
ITERATIONS=(1)
|
||||
|
||||
|
@ -16,11 +13,9 @@ zparseopts -F -K \
|
|||
x:=EXPORT -export:=EXPORT \
|
||||
z:=SIZE -size:=SIZE
|
||||
|
||||
BIN=$HOME/bin
|
||||
COLOR="python -u $BIN/colors/read_plus.py ${SIZE[-1]} ${FILE[-1]}"
|
||||
IFLAG=
|
||||
RUN_READ_PLUS="sudo run-read_plus.zsh"
|
||||
USER=$(whoami)
|
||||
SRV_DIR=${EXPORT[-1]}/$USER/read_plus
|
||||
TEST_DIR=${MOUNTPOINT[-1]}/read_plus
|
||||
TEST_DEV=${SERVER[-1]}:$SRV_DIR
|
||||
|
|
11
xfstests.zsh
11
xfstests.zsh
|
@ -1,10 +1,5 @@
|
|||
#!/bin/zsh -e
|
||||
CLIENT=(client)
|
||||
SERVER=(server)
|
||||
EXPORT=(/srv/test)
|
||||
SCRATCH=(/srv/scratch)
|
||||
MOUNTPOINT=(/mnt/test)
|
||||
SCRATCHMNT=(/mnt/scratch)
|
||||
source common.zsh
|
||||
VERSION=(3 4.0 4.1 4.2)
|
||||
PROTO=(tcp)
|
||||
|
||||
|
@ -19,11 +14,9 @@ zparseopts -D -K \
|
|||
x:=EXPORT -export:=EXPORT \
|
||||
v+:=VERSION -version+:=VERSION
|
||||
|
||||
BIN=$HOME/bin
|
||||
COLOR=$BIN/colors/xfstests.py
|
||||
RUN_XFSTESTS="sudo run-xfstests.zsh"
|
||||
OPTIONS="sec=sys"
|
||||
USER=$(whoami)
|
||||
RESULT_BASE=$HOME/.local/share/xfstests/
|
||||
DATE=$(date +%Y-%m-%d-%H:%M:%S%z)
|
||||
TODAY=$(date +%Y/%m/%d)
|
||||
|
@ -93,4 +86,4 @@ if [ ! -z "$TAG" ]; then
|
|||
mkdir -p $TAGRES
|
||||
ln $RESULTS/$NOW.tar.xz $TAGRES/$DATE.tar.xz
|
||||
fi
|
||||
optirun report-xfstests.py $RESULTS/$NOW.tar.xz & disown
|
||||
report-xfstests.py $RESULTS/$NOW.tar.xz & disown
|
||||
|
|
Loading…
Reference in New Issue