From 71994fa608ae9641d471cbb8cf1ce487a9f761b6 Mon Sep 17 00:00:00 2001 From: Frederick Dilger Date: Sat, 28 Sep 2024 15:01:30 -0600 Subject: [PATCH] LU-18191 tests: sanity-quota 90b racer fix It looks like there was a small race condition in the test. There was one block of root user usage that would be freed since the start of the test. Now, if the "head" or "tail" does not match, it will be refetched and tested to see if it is still not matching. This will handle the race condition without adding overhead for the passing cases. Test-Parameters: trivial testlist=sanity-quota env=ONLY=90b,ONLY_MINUTES=120 Signed-off-by: Frederick Dilger Change-Id: Ica46a79320c64caec006287bc5657488d5d1956a Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56532 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Sergey Cheremencev Reviewed-by: Oleg Drokin --- lustre/tests/sanity-quota.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lustre/tests/sanity-quota.sh b/lustre/tests/sanity-quota.sh index 079c686..1275b8a 100755 --- a/lustre/tests/sanity-quota.sh +++ b/lustre/tests/sanity-quota.sh @@ -6390,10 +6390,14 @@ check_quota_two_mounts() actual=$(echo "$full" | head -n$(echo "$head" | wc -l)) [[ "$actual" == "$head" ]] || + # re-fetch head if it failed + [[ "$actual" == "$($LFS quota -q $opts $id $MOUNT)" ]] || error "quota info from $MOUNT not '$head', found '$actual'" actual=$(echo "$full" | tail -n$(echo "$tail" | wc -l)) [[ "$actual" == "$tail" ]] || + # re-fetch tail if it failed + [[ "$actual" == "$($LFS quota -q $opts $id $MOUNT2)" ]] || error "quota info from $MOUNT2 not '$tail', found '$actual'" } -- 1.8.3.1