From 6dd8066cdfb9d2f4c33698f76caaeef76081d9e9 Mon Sep 17 00:00:00 2001 From: Jian Yu Date: Thu, 11 Jan 2018 12:05:13 -0800 Subject: [PATCH] LU-10488 tests: fix sub-test return value issue in sanity-dom.sh 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 Reviewed-on: https://review.whamcloud.com/30842 Tested-by: Jenkins Reviewed-by: Jinshan Xiong Tested-by: Maloo Reviewed-by: Mike Pershin Reviewed-by: Oleg Drokin --- lustre/tests/sanity-dom.sh | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/lustre/tests/sanity-dom.sh b/lustre/tests/sanity-dom.sh index 4931786..4cdb37e 100644 --- a/lustre/tests/sanity-dom.sh +++ b/lustre/tests/sanity-dom.sh @@ -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" -- 1.8.3.1