From 5c1e9f9dada5f2f44a4fc9f46c4bb0789b747df6 Mon Sep 17 00:00:00 2001 From: nasf Date: Sat, 9 Jul 2011 00:20:56 +0800 Subject: [PATCH] LU-168 Fix schedule race in sanityn PDO lock tests 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 Reviewed-on: http://review.whamcloud.com/1030 Tested-by: Hudson Reviewed-by: Mikhail Pershin Reviewed-by: Oleg Drokin --- lustre/tests/sanityn.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/lustre/tests/sanityn.sh b/lustre/tests/sanityn.sh index 15c3109..a229c61 100644 --- a/lustre/tests/sanityn.sh +++ b/lustre/tests/sanityn.sh @@ -1031,6 +1031,7 @@ run_test 39c "check truncate mtime update ======================" 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" -- 1.8.3.1