Whamcloud - gitweb
LU-1798 test: check connect_flags for jobstats
authorNiu Yawei <niu@whamcloud.com>
Wed, 29 Aug 2012 02:45:16 +0000 (22:45 -0400)
committerAndreas Dilger <adilger@whamcloud.com>
Mon, 3 Sep 2012 17:14:42 +0000 (13:14 -0400)
Check connect_flags before enabling jobstats in the t-f.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ib36575fe7d08b257a2a7dda86851806bf44d7a41
Reviewed-on: http://review.whamcloud.com/3806
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/tests/sanity.sh
lustre/tests/test-framework.sh

index f434a8e..ca146f6 100644 (file)
@@ -9050,6 +9050,9 @@ verify_jobstats() {
 }
 
 test_205() { # Job stats
+       [ -z "$(lctl get_param -n mdc.*.connect_flags | grep jobstats)" ] &&
+               skip "Server doesn't support jobstats" && return 0
+
        local cmd
        OLD_JOBENV=`$LCTL get_param -n jobid_var`
        if [ $OLD_JOBENV != $JOBENV ]; then
index ad29a3e..4467246 100644 (file)
@@ -2915,7 +2915,9 @@ init_param_vars () {
        osc_ensure_active client $TIMEOUT
 
        local jobid_var
-       if [ $JOBSTATS_AUTO -ne 0 ]; then
+       if [ -z "$(lctl get_param -n mdc.*.connect_flags | grep jobstats)" ]; then
+               jobid_var="none"
+       elif [ $JOBSTATS_AUTO -ne 0 ]; then
                echo "enable jobstats, set job scheduler as $JOBID_VAR"
                jobid_var=$JOBID_VAR
        else