cthon: Add arguments for printing client and server dmesg log
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
parent
cbcc5ba269
commit
a6d46ff0e1
|
@ -5,8 +5,10 @@ function _cthon.zsh() {
|
||||||
{-c,--client}'[the client to test]: : _alternative
|
{-c,--client}'[the client to test]: : _alternative
|
||||||
"hosts\:hosts\: _ssh_hosts"
|
"hosts\:hosts\: _ssh_hosts"
|
||||||
"domains\:domains\:($(virsh list --all --name))"' \
|
"domains\:domains\:($(virsh list --all --name))"' \
|
||||||
|
--dmesg'[print client dmesg log after running tests]' \
|
||||||
--nconnect'[number of connections]: :($(seq 1 32))' \
|
--nconnect'[number of connections]: :($(seq 1 32))' \
|
||||||
--krb5'[run tests with sec=krb5]' \
|
--krb5'[run tests with sec=krb5]' \
|
||||||
|
--srvdmesg'[print server dmesg log after running tests]' \
|
||||||
{-p,--mountpoint}'[the directory to mount the server]: : _files -/' \
|
{-p,--mountpoint}'[the directory to mount the server]: : _files -/' \
|
||||||
{-r,--rdma}'[test using rdma]: :(rxe siw)' \
|
{-r,--rdma}'[test using rdma]: :(rxe siw)' \
|
||||||
{-s,--server}'[the server to test against]: : _alternative
|
{-s,--server}'[the server to test against]: : _alternative
|
||||||
|
|
18
cthon.zsh
18
cthon.zsh
|
@ -6,6 +6,7 @@ MOUNTPOINT=(/mnt/test)
|
||||||
|
|
||||||
zparseopts -F -K \
|
zparseopts -F -K \
|
||||||
c:=CLIENT -client:=CLIENT \
|
c:=CLIENT -client:=CLIENT \
|
||||||
|
-dmesg=DMESG -srvdmesg=SRVDMESG \
|
||||||
p:=MOUNTPOINT -mountpoint:=MOUNTPOINT \
|
p:=MOUNTPOINT -mountpoint:=MOUNTPOINT \
|
||||||
-nconnect:=NCONNECT \
|
-nconnect:=NCONNECT \
|
||||||
-krb5=KRB5 \
|
-krb5=KRB5 \
|
||||||
|
@ -33,6 +34,12 @@ fi
|
||||||
if [ ${#KRB5} -gt 0 ]; then
|
if [ ${#KRB5} -gt 0 ]; then
|
||||||
RUN_CTHON="$RUN_CTHON --dokrb5"
|
RUN_CTHON="$RUN_CTHON --dokrb5"
|
||||||
fi
|
fi
|
||||||
|
if [ ${#DMESG} -gt 0 ]; then
|
||||||
|
ssh ${CLIENT[-1]} "sudo dmesg --clear"
|
||||||
|
fi
|
||||||
|
if [ ${#SRVDMESG} -gt 0 ]; then
|
||||||
|
ssh ${SERVER[-1]} "sudo dmesg --clear"
|
||||||
|
fi
|
||||||
|
|
||||||
ssh ${CLIENT[-1]} "sudo setup-testdirs.zsh ${SERVER[-1]} ${EXPORT[-1]} ${MOUNTPOINT[-1]} $USER" | python $COLOR
|
ssh ${CLIENT[-1]} "sudo setup-testdirs.zsh ${SERVER[-1]} ${EXPORT[-1]} ${MOUNTPOINT[-1]} $USER" | python $COLOR
|
||||||
echo
|
echo
|
||||||
|
@ -40,4 +47,15 @@ echo
|
||||||
#
|
#
|
||||||
# Run tests
|
# Run tests
|
||||||
#
|
#
|
||||||
|
set +e
|
||||||
ssh ${CLIENT[-1]} "$RUN_CTHON --server ${SERVER[-1]} --serverdir ${EXPORT[-1]}/$USER 2>&1" | python -u $COLOR
|
ssh ${CLIENT[-1]} "$RUN_CTHON --server ${SERVER[-1]} --serverdir ${EXPORT[-1]}/$USER 2>&1" | python -u $COLOR
|
||||||
|
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
|
||||||
|
|
Loading…
Reference in New Issue