From: Elena Gryaznova Date: Wed, 10 Oct 2018 14:20:10 +0000 (+0300) Subject: LU-11492 tests: fix thread_sanity() defect X-Git-Tag: 2.12.0-RC1~29 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=f96809bb4d986a384cd5527b706f14bf150a2fba LU-11492 tests: fix thread_sanity() defect tmin, tmax, tstarted are not set if do_facet fails by some reason. This leads to the following failure: Assertion 28 failed: (($tstarted >= $tmin && $tstarted <= $tmax )) (expanded: ((16 >= && 16 <= 16 ))) Patch sets variables equal to 0 for cases of failed do_facet, like it is done for other similar cases. Test-Parameters:trivial testlist=sanity envdefinitions=ONLY="53a 53b" Signed-off-by: Elena Gryaznova Cray-bug-id: LUS-5638 Reviewed-by: Alexander Boyko Reviewed-by: Vitaly Fertman Change-Id: If713ba20a0f71cb17208f776a9a4edd359c07c43 Reviewed-on: https://review.whamcloud.com/33335 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Alexandr Boyko Reviewed-by: James Nunez Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index fa8b6bf..0f5cafc 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -4172,10 +4172,12 @@ thread_sanity() { setmodopts $modname "$oldvalue" # Check that $opts took - tmin=$(do_facet $facet "$LCTL get_param -n ${paramp}.threads_min") - tmax=$(do_facet $facet "$LCTL get_param -n ${paramp}.threads_max") + tmin=$(do_facet $facet "$LCTL get_param -n ${paramp}.threads_min" || + echo 0) + tmax=$(do_facet $facet "$LCTL get_param -n ${paramp}.threads_max" || + echo 0) tstarted=$(do_facet $facet \ - "$LCTL get_param -n ${paramp}.threads_started") + "$LCTL get_param -n ${paramp}.threads_started" || echo 0) lassert 28 "$msg" '(($tstarted >= $tmin && $tstarted <= $tmax ))' || return $? cleanup