Whamcloud - gitweb
LU-10488 tests: fix sub-test return value issue in sanity-dom.sh 42/30842/3
authorJian Yu <jian.yu@intel.com>
Thu, 11 Jan 2018 20:05:13 +0000 (12:05 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 20 Jan 2018 06:20:03 +0000 (06:20 +0000)
This patch fixes test_sanity() and test_sanityn() in sanity-dom.sh
to return the actual exit values of sanity.sh and sanityn.sh.

For bash, variable assignments preceding commands affect only that
command. So, we can just change sh to bash and do not need save
and restore the value of ONLY.

Test-Parameters: trivial

Change-Id: I1edb1022f856552cb19cb6bd713aa9b6fce37b73
Signed-off-by: Jian Yu <jian.yu@intel.com>
Reviewed-on: https://review.whamcloud.com/30842
Tested-by: Jenkins
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/sanity-dom.sh

index 4931786..4cdb37e 100644 (file)
@@ -103,25 +103,19 @@ run_test fsx "Dual-mount fsx with DoM files"
 
 test_sanity()
 {
-       local SAVE_ONLY=$ONLY
-
-       [ ! -f sanity.sh ] && skip_env "No sanity.sh skipping" && return
+       [[ -f sanity.sh ]] || { skip "sanity.sh doesn't exist"; return 0; }
        # XXX: to fix 45
        ONLY="36 39 40 41 42 43 46 56r 101e 119a 131 150 155a 155b 155c \
-               155d 207 241 251" OSC="mdc" DOM="yes" sh sanity.sh
-       ONLY=$SAVE_ONLY
+               155d 207 241 251" OSC="mdc" DOM="yes" bash sanity.sh
 }
 run_test sanity "Run sanity with Data-on-MDT files"
 
 test_sanityn()
 {
-       local SAVE_ONLY=$ONLY
-
-       [ ! -f sanity.sh ] && skip_env "No sanity.sh skipping" && return
+       [[ -f sanityn.sh ]] || { skip "sanityn.sh doesn't exist"; return 0; }
        # XXX: to fix 60
        ONLY="1 2 4 5 6 7 8 9 10 11 12 14 17 19 20 23 27 39 51a 51c 51d" \
-               OSC="mdc" DOM="yes" sh sanityn.sh
-       ONLY=$SAVE_ONLY
+               OSC="mdc" DOM="yes" bash sanityn.sh
 }
 run_test sanityn "Run sanityn with Data-on-MDT files"