From: Jinshan Xiong Date: Wed, 11 Jan 2017 02:07:19 +0000 (-0800) Subject: LU-7812 tests: address race condition for sanity:120{e,f} X-Git-Tag: 2.9.52~42 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=e240fb5099af8e62c532d314317095800ebb6864 LU-7812 tests: address race condition for sanity:120{e,f} By adding a delay between lock cancel and stat, it can avoid the problem that the locks are still held by ldlm lock thread while 'cancel_lru_locks osc' is called. Test-Parameters: trivial envdefinitions="ONLY=120e" testlist=sanity,sanity,sanity,sanity,sanity,sanity,sanity,sanity,sanity,sanity Signed-off-by: Jinshan Xiong Change-Id: I2095cb1df05ff45c2671edaed5a61bcdd4a56266 Reviewed-on: https://review.whamcloud.com/24811 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 776eb0e..1654625 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -8339,6 +8339,7 @@ test_120e() { stat $DIR/$tdir $DIR/$tdir/f1 > /dev/null # XXX client can not do early lock cancel of OST lock # during unlink (LU-4206), so cancel osc lock now. + sleep 2 cancel_lru_locks osc can1=$(do_facet $SINGLEMDS \ "$LCTL get_param -n ldlm.services.ldlm_canceld.stats" | @@ -8381,6 +8382,7 @@ test_120f() { stat $DIR/$tdir/d1 $DIR/$tdir/d2 $DIR/$tdir/d1/f1 $DIR/$tdir/d2/f2 > /dev/null # XXX client can not do early lock cancel of OST lock # during rename (LU-4206), so cancel osc lock now. + sleep 2 cancel_lru_locks osc can1=$(do_facet $SINGLEMDS \ "$LCTL get_param -n ldlm.services.ldlm_canceld.stats" |