diff --git a/lustre/tests/sanity-quota.sh b/lustre/tests/sanity-quota.sh
index bb3d064022e893412caebc156e7f1dc9b900e65e..5328acec18f97064328d6050b9fcffc814e80447 100644
--- a/lustre/tests/sanity-quota.sh
+++ b/lustre/tests/sanity-quota.sh
@@ -728,7 +728,7 @@ test_8() {
 	echo "  Set enough high limit for user: $TSTUSR"
 	$LFS setquota -u $TSTUSR -b 0 -B $BLK_LIMIT -i 0 -I $FILE_LIMIT $DIR
 	echo "  Set enough high limit for group: $TSTUSR"
-	$LFS setquota -g $USER -b 0 -B $BLK_LIMIT -i 0 -I $FILE_LIMIT $DIR
+	$LFS setquota -g $TSTUSR -b 0 -B $BLK_LIMIT -i 0 -I $FILE_LIMIT $DIR
 
 	chmod 0777 $DIR/$tdir
 	local duration=""