From 263e80f4572b49044407b09f8a3e393677eafb5d Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Fri, 1 Feb 2019 14:07:01 -0700 Subject: [PATCH] LU-11721 tests: wait for statfs to update on DNE Wait for the statfs to update properly when there are multiple MDTs so that the test doesn't gratuitously fail. Fixes: 757403191c3 ("LU-11721 utils: print used inodes ratio ...") Test-Parameters: trivial testlist=sanity mdscount=2 mdtcount=4 ostcount=7 Test-Parameters: testlist=sanity fstype=zfs mdscount=2 mdtcount=4 Signed-off-by: Andreas Dilger Change-Id: Ia75f7bd4d3027c91f10ce990730b2bd7123ebbe5 Reviewed-on: https://review.whamcloud.com/34164 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Jian Yu --- lustre/tests/sanity.sh | 52 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 21 deletions(-) diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 1fe5b64..a17303e 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -19417,31 +19417,45 @@ check_lfs_df() { local inodes local df_out local lfs_df_out + local tries=100 + local count=0 + local passed=false # blocks or inodes [ "$1" == "blocks" ] && inodes= || inodes="-i" - # read the lines of interest - df_out=($(df $inodes $dir | tail -n +2)) || - error "df $inodes $dir | tail -n +2 failed" - lfs_df_out=($($LFS df $inodes $dir | grep filesystem_summary:)) || - error "lfs df $inodes $dir | grep filesystem_summary: failed" - - # skip the first substrings of each command output as they are different - # :/://dev/null || error "creating 1 file in $dir failed" - cancel_lru_locks osc - sync; sleep 2 check_lfs_df blocks $dir check_lfs_df inodes $dir @@ -19475,8 +19487,6 @@ test_418() { error "dd to $dir/${tfile}-0 failed" # retest - cancel_lru_locks osc - sync; sleep 10 check_lfs_df blocks $dir check_lfs_df inodes $dir -- 1.8.3.1