Whamcloud - gitweb
LU-1538 tests: standardize test script init – parallel-scale 55/36355/11
authorJames Nunez <jnunez@whamcloud.com>
Wed, 2 Oct 2019 20:42:24 +0000 (14:42 -0600)
committerOleg Drokin <green@whamcloud.com>
Sat, 12 Sep 2020 15:45:01 +0000 (15:45 +0000)
Standardize the initial Lustre test script initialization for
clarity and consistency for all parallel-scale tests.

The LUSTRE path is already normalized in init_test_env(), so this
doesn't need to be done in the caller.  Use $(...) subshells instead
of `...` in the affected lines.  Remove NAME, SRCDIR, PATH, MULTIOP,
SETUP, CLEANUP, CHECKSTAT, TMP, SAVE_PWD, variable initialization,
since it is already done in init_test_env() or not needed in the test
scripts.

Move all definitions of ALWAYS_EXCEPT and SLOW to after
init_test_env() and init_logging() and call build_test_filter()
immediately after the ALWAYS_EXCEPT and SLOW definitions.

Test-Parameters: trivial
Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes clientdistro=el7.8 clientcount=2 osscount=1 ostcount=7 mdscount=1 mdtcount=1 austeroptions=-R testlist=parallel-scale-nfsv4
Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes clientdistro=el7.8 clientcount=2 osscount=1 ostcount=7 mdscount=1 mdtcount=1 austeroptions=-R testlist=parallel-scale,parallel-scale-nfsv3
Signed-off-by: James Nunez <jnunez@whamcloud.com>
Change-Id: I5690f17033ca92e5578c579e81cbcc024ca7f770
Reviewed-on: https://review.whamcloud.com/36355
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/parallel-scale-cifs.sh
lustre/tests/parallel-scale-nfs.sh
lustre/tests/parallel-scale-nfsv3.sh
lustre/tests/parallel-scale-nfsv4.sh
lustre/tests/parallel-scale.sh

index 4eaf97a..a569908 100644 (file)
 
 #set -vx
 
-LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 init_logging
+
 . $LUSTRE/tests/setup-cifs.sh
 
 check_and_setup_lustre
index 1d27a08..7f426ee 100755 (executable)
@@ -1,15 +1,17 @@
 #!/bin/bash
-#
-#set -vx
 
 NFSVERSION=${1:-"3"}
-LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
+
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 # only call init_test_env if this script is called directly
 if [[ -z "$TESTSUITE" || "$TESTSUITE" = "$(basename $0 .sh)" ]]; then
        init_test_env $@
+else
+       . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
+
 fi
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
+
 init_logging
 
 racer=$LUSTRE/tests/racer/racer.sh
@@ -69,7 +71,6 @@ NFSCLIENT=true
 FAIL_ON_ERROR=false
 
 # common setup
-MACHINEFILE=${MACHINEFILE:-$TMP/$(basename $0 .sh).machines}
 clients=${NFS_CLIENTS:-$HOSTNAME}
 generate_machine_file $clients $MACHINEFILE ||
        error "Failed to generate machine file"
index f75327c..014d2cd 100755 (executable)
@@ -1,8 +1,6 @@
 #!/bin/bash
-#
-#set -vx
 
-LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
 
index e0a5fc4..14ee9d6 100755 (executable)
@@ -1,8 +1,6 @@
 #!/bin/bash
-#
-#set -vx
 
-LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
 
index b7d9a82..c82a302 100644 (file)
@@ -1,15 +1,13 @@
 #!/bin/bash
-#
-#set -vx
 
-LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 init_logging
 
-# bug number for skipped test:  LU-9429
-     ALWAYS_EXCEPT="            parallel_grouplock  $PARALLEL_SCALE_EXCEPT "
+ALWAYS_EXCEPT="$PARALLEL_SCALE_EXCEPT "
+# bug number for skipped test: LU-9429
+ALWAYS_EXCEPT+="               parallel_grouplock "
 
 if [ "$mds1_FSTYPE" = zfs -o "$ost1_FSTYPE" = zfs ]; then
        ZFSSLOW=$SLOW
@@ -22,11 +20,12 @@ if [ "$mds1_FSTYPE" = zfs -o "$ost1_FSTYPE" = zfs ]; then
        statahead_NUMFILES=${statahead_NUMFILES:-100000}
 fi
 
+build_test_filter
+
 # common setup
-MACHINEFILE=${MACHINEFILE:-$TMP/$(basename $0 .sh).machines}
 clients=${CLIENTS:-$HOSTNAME}
 generate_machine_file $clients $MACHINEFILE ||
-    error "Failed to generate machine file"
+       error "Failed to generate machine file"
 num_clients=$(get_node_count ${clients//,/ })
 
 # compilbench
@@ -67,7 +66,6 @@ fi
 
 . $LUSTRE/tests/functions.sh
 
-build_test_filter
 check_and_setup_lustre
 
 get_mpiuser_id $MPI_USER