In sanityn PDO lock tests, even if the second operation is blocked by
the first one on server-side, after the blocking, the second one may
be finished earlier than the first one because of client-side schedule
order. So sleep a sec before check_pdo_conflict() to ensure the first
operation is finished after OBD_FAIL_MDS_PDO_LOCK barriers.
Change-Id: I62412d74e17be012ee6660179ad77375c196671d
Signed-off-by: nasf <yong.fan@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1030
Tested-by: Hudson
Reviewed-by: Mikhail Pershin <tappro@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
check_pdo_conflict() {
local pid=$1
local conflict=0
+ sleep 1 # to ensure OP1 is finished on client if OP2 is blocked by OP1
if [[ `ps --pid $pid | wc -l` == 1 ]]; then
conflict=1
echo "Conflict"