#!/bin/bash

# Usage:  runit.bash <dst> <remote-path>
# Put output into a file, then compare different files.

TARGET=${1:-larry}
REMOTE_PATH=${2:-/export/home/danmcd}

echo "Running against ${TARGET}:${REMOTE_PATH}"

# NOTE: illumos doesn't support NFSv4.1, so do not use tests involving it.
# Also, the suite doesn't support NFSv2, but TBH, that's not a big deal either.

set -x
# Direct I/O (v4 only)
nfstest_dio -s $TARGET -e $REMOTE_PATH --nfsversion 4

# Basic interop - exclude NFSv4.1 tests
TESTLIST="test01,test02,test04,test05,test10,test11,test13,test14"
nfstest_interop -s $TARGET -e $REMOTE_PATH --runtest $TESTLIST --nfsversion 3
nfstest_interop -s $TARGET -e $REMOTE_PATH --runtest $TESTLIST --nfsversion 4

# Locking
nfstest_lock -s $TARGET -e $REMOTE_PATH --nfsversion 3
nfstest_lock -s $TARGET -e $REMOTE_PATH --nfsversion 4

# POSIX
nfstest_posix -s $TARGET -e $REMOTE_PATH --nfsversion 3
nfstest_posix -s $TARGET -e $REMOTE_PATH --nfsversion 4
