Usage ${0##*/} [options] suite [suite options] [suite [suite options]]
Run Lustre regression tests suites.
-c, --config CONFIG Test environment config file
+ -C, --client-only Run client-side sanity tests against an already setup
+ filesystem. Users must define FSNAME and mgs_HOST manually.
-d, --log-dir LOGDIR Top level directory for logs
-D, --full-log-dir FULLLOGDIR Full directory for logs
-f, --cfg-name STR Config name (cfg/<name>.sh)
auster -f large -g test-groups/regression -i 5
+Run the client-only tests from sanity.
+
+ FSNAME=myfilesystem mgs_HOST=1.2.3.4 auster -C sanity
+
EOF
exit
}
script_lang=bash
test_logs_dir=/tmp/test_logs/$(date +%Y-%m-%d)/$(date +%H%M%S)
export HONOR_EXCEPT=
-do_setup=true
+export do_setup=true
+export client_tests_only=false
export "${SLOW:=no}"
export "${NAME:=local}"
shift
case "$arg" in
--config) set -- "$@" '-c';;
+ --client-only) set -- "$@" '-C';;
--log-dir) set -- "$@" '-d';;
--full-log-dir) set -- "$@" '-D';;
--group) set -- "$@" '-g';;
esac
done
-while getopts "c:d:D:nkf:S:g:Hi:rRslL:Nhv" opt
+while getopts "c:Cd:D:nkf:S:g:Hi:rRslL:Nhv" opt
do
case "$opt" in
c) export CONFIG=$OPTARG;;
+ C) client_tests_only=true;;
d) test_logs_dir=$OPTARG/$(date +%Y-%m-%d)/$(date +%H%M%S);;
D) test_logs_dir=$OPTARG;;
g) test_group_file=$OPTARG;;
. $LUSTRE/tests/test-framework.sh
init_test_env
+# Set CLIENTONLY, while trying to discover some common
+# variables so the test runner doesn't need do this
+# manually
+if $client_tests_only; then
+ export CLIENTONLY=true;
+ export FSTYPE=${FSTYPE:-ldiskfs};
+ export MDSCOUNT="$(( $($LFS mdts | wc -l) - 1 ))"
+ export OSTCOUNT="$(( $($LFS osts | wc -l) - 1 ))"
+fi
+
print_summary () {
trap 0
local form="%-13s %-17s %s\n"
export NAME MOUNT START CLEAN
. ${CONFIG:-$LUSTRE/tests/cfg/$NAME.sh}
-assert_env mds_HOST
-assert_env ost_HOST OSTCOUNT
-assert_env FSNAME MOUNT MOUNT2
+# Only need to know where (MOUNT) and how (mgs_HOST) to
+# mount Lustre for client-side only tests
+if $client_tests_only; then
+ assert_env mgs_HOST
+else
+ assert_env mds_HOST
+ assert_env ost_HOST OSTCOUNT
+ assert_env MOUNT2
+fi
+
+assert_env FSNAME MOUNT
echo "Started at `date`"
setup_if_needed
local facet
for facet in ${facets//,/ }; do
- if [ $node == $(facet_host $facet) ] ||
- [ $node == "$(facet_failover_host $facet)" ]; then
+ if [[ $node == $(facet_host $facet) ]] ||
+ [[ $node == "$(facet_failover_host $facet)" ]]; then
fstype=$(facet_fstype $facet)
if [[ $fstypes != *$fstype* ]]; then
fstypes+="${fstypes:+,}$fstype"
}
do_check_and_setup_lustre() {
+ # If auster does not want us to setup, then don't.
+ ! ${do_setup} && return
+
echo "=== $TESTSUITE: start setup $(date +'%H:%M:%S (%s)') ==="
sanitize_parameters