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 <fdilger@whamcloud.com>
Change-Id: Ica46a79320c64caec006287bc5657488d5d1956a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56532
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
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'"
}