Whamcloud - gitweb
LU-6119 test: Add testing for Lustre exported via Samba
[fs/lustre-release.git] / lustre / tests / test-framework.sh
index 1dd2725..529714d 100755 (executable)
@@ -230,6 +230,7 @@ init_test_env() {
     # Ubuntu, at least, has a truncate command in /usr/bin
     # so fully path our truncate command.
     export TRUNCATE=${TRUNCATE:-$LUSTRE/tests/truncate}
+       export FSX=${FSX:-$LUSTRE/tests/fsx}
     export MDSRATE=${MDSRATE:-"$LUSTRE/tests/mpi/mdsrate"}
     [ ! -f "$MDSRATE" ] && export MDSRATE=$(which mdsrate 2> /dev/null)
     if ! echo $PATH | grep -q $LUSTRE/tests/racer; then
@@ -3327,6 +3328,7 @@ cleanup_echo_devs () {
 
 cleanupall() {
     nfs_client_mode && return
+       cifs_client_mode && return
 
     stopall $*
     cleanup_echo_devs
@@ -3563,6 +3565,7 @@ writeconf_all () {
 
 setupall() {
     nfs_client_mode && return
+       cifs_client_mode && return
 
     sanity_mount_check ||
         error "environments are insane!"
@@ -3828,6 +3831,11 @@ nfs_client_mode () {
     return 1
 }
 
+cifs_client_mode () {
+       [ x$CIFSCLIENT = xyes ] &&
+               echo "CIFSCLIENT=$CIFSCLIENT mode: setup, cleanup, check config skipped"
+}
+
 check_config_client () {
     local mntpt=$1
 
@@ -3875,6 +3883,7 @@ check_config_clients () {
        local mntpt=$1
 
        nfs_client_mode && return
+       cifs_client_mode && return
 
        do_rpc_nodes "$clients" check_config_client $mntpt
 
@@ -3921,6 +3930,7 @@ is_empty_fs() {
 
 check_and_setup_lustre() {
     nfs_client_mode && return
+       cifs_client_mode && return
 
     local MOUNTED=$(mounted_lustre_filesystems)
 
@@ -7330,3 +7340,12 @@ check_start_ost_idx() {
                error "OST index of the first stripe on $file is" \
                      "$start_ost_idx, should be $expected"
 }
+
+killall_process () {
+       local clients=${1:-$(hostname)}
+       local name=$2
+       local signal=$3
+       local rc=0
+
+       do_nodes $clients "killall $signal $name"
+}