Whamcloud - gitweb
LU-18191 tests: sanity-quota 90b racer fix 32/56532/4
authorFrederick Dilger <fdilger@whamcloud.com>
Sat, 28 Sep 2024 21:01:30 +0000 (15:01 -0600)
committerOleg Drokin <green@whamcloud.com>
Fri, 4 Oct 2024 00:16:40 +0000 (00:16 +0000)
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>
lustre/tests/sanity-quota.sh

index 079c686..1275b8a 100755 (executable)
@@ -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'"
 }