diff mbox series

[7/7] xfs: use $XFS_QUOTA_PROG instead of hardcoding xfs_quota

Message ID 20210722073832.976547-8-hch@lst.de (mailing list archive)
State New, archived
Headers show
Series [1/7] common/quota: allow removing quota options entirely in _qmount_option | expand

Commit Message

Christoph Hellwig July 22, 2021, 7:38 a.m. UTC
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 tests/xfs/007 |  4 ++--
 tests/xfs/052 |  4 ++--
 tests/xfs/108 |  6 +++---
 tests/xfs/220 |  4 ++--
 tests/xfs/261 |  4 ++--
 tests/xfs/303 | 14 +++++++-------
 tests/xfs/304 |  6 +++---
 tests/xfs/305 |  2 +-
 8 files changed, 22 insertions(+), 22 deletions(-)

Comments

Darrick J. Wong July 22, 2021, 6:25 p.m. UTC | #1
On Thu, Jul 22, 2021 at 09:38:32AM +0200, Christoph Hellwig wrote:
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Nice!!
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  tests/xfs/007 |  4 ++--
>  tests/xfs/052 |  4 ++--
>  tests/xfs/108 |  6 +++---
>  tests/xfs/220 |  4 ++--
>  tests/xfs/261 |  4 ++--
>  tests/xfs/303 | 14 +++++++-------
>  tests/xfs/304 |  6 +++---
>  tests/xfs/305 |  2 +-
>  8 files changed, 22 insertions(+), 22 deletions(-)
> 
> diff --git a/tests/xfs/007 b/tests/xfs/007
> index d1946524..66f1f101 100755
> --- a/tests/xfs/007
> +++ b/tests/xfs/007
> @@ -40,11 +40,11 @@ do_test()
>  
>  	_qmount
>  	echo "*** turn off $off_opts quotas"
> -	xfs_quota -x -c "off -$off_opts" $SCRATCH_MNT
> +	$XFS_QUOTA_PROG -x -c "off -$off_opts" $SCRATCH_MNT
>  	_scratch_unmount
>  	_qmount_option ""
>  	_scratch_mount
> -	xfs_quota -x -c "remove -$off_opts" $SCRATCH_MNT
> +	$XFS_QUOTA_PROG -x -c "remove -$off_opts" $SCRATCH_MNT
>  	echo "*** umount"
>  	_scratch_unmount
>  
> diff --git a/tests/xfs/052 b/tests/xfs/052
> index 010f9ad6..75761022 100755
> --- a/tests/xfs/052
> +++ b/tests/xfs/052
> @@ -63,13 +63,13 @@ bsoft=1001
>  bhard=1001
>  isoft=10
>  ihard=10
> -xfs_quota -x \
> +$XFS_QUOTA_PROG -x \
>  	-c "limit -$type bsoft=${bsoft}k bhard=${bhard}k $id" \
>  	-c "limit -$type isoft=$isoft ihard=$ihard $id" \
>  	$SCRATCH_DEV
>  
>  # cross check blks, softblks, hardblks <-> quota, xfs_db
> -xfs_quota -c "quota -$type -birnN $id" $SCRATCH_DEV |
> +$XFS_QUOTA_PROG -c "quota -$type -birnN $id" $SCRATCH_DEV |
>  			tr -d '\n' | tr -s '[:space:]' | tee -a $seqres.full |
>  	perl -ne 'if (m[^\s*'$SCRATCH_DEV'\s+(\d+)\s+(\d+)\s+(\d+)]) {
>  		print "used_blocks=", $1, "\n";
> diff --git a/tests/xfs/108 b/tests/xfs/108
> index 0af22443..8a102133 100755
> --- a/tests/xfs/108
> +++ b/tests/xfs/108
> @@ -47,9 +47,9 @@ test_accounting()
>  	for file in $SCRATCH_MNT/{buffer,direct,mmap}; do
>  		$here/src/lstat64 $file | head -3 | _filter_scratch
>  	done
> -	xfs_quota -c "quota -hnb -$type $id" $QARGS | _filter_quota
> -	xfs_quota -c "quota -hni -$type $id" $QARGS | _filter_quota
> -	xfs_quota -c "quota -hnr -$type $id" $QARGS | _filter_quota
> +	$XFS_QUOTA_PROG -c "quota -hnb -$type $id" $QARGS | _filter_quota
> +	$XFS_QUOTA_PROG -c "quota -hni -$type $id" $QARGS | _filter_quota
> +	$XFS_QUOTA_PROG -c "quota -hnr -$type $id" $QARGS | _filter_quota
>  }
>  
>  export MOUNT_OPTIONS="-opquota"
> diff --git a/tests/xfs/220 b/tests/xfs/220
> index c847a0dc..241a7abd 100755
> --- a/tests/xfs/220
> +++ b/tests/xfs/220
> @@ -41,7 +41,7 @@ _scratch_mkfs_xfs >/dev/null 2>&1
>  _scratch_mount -o uquota
>  
>  # turn off quota
> -xfs_quota -x -c off $SCRATCH_DEV
> +$XFS_QUOTA_PROG -x -c off $SCRATCH_DEV
>  
>  # and unmount (this used to crash)
>  _scratch_unmount
> @@ -58,7 +58,7 @@ _scratch_mount -o uquota
>  # The sed expression below replaces a notrun to cater for kernels that have
>  # removed the ability to disable quota accounting at runtime.  On those
>  # kernel this test is rather useless, and in a few years we can drop it.
> -xfs_quota -x -c off -c remove $SCRATCH_DEV 2>&1 | \
> +$XFS_QUOTA_PROG -x -c off -c remove $SCRATCH_DEV 2>&1 | \
>  	sed -e '/XFS_QUOTARM: Invalid argument/d'
>  
>  # and unmount again
> diff --git a/tests/xfs/261 b/tests/xfs/261
> index 3b58db8d..eb8a72cd 100755
> --- a/tests/xfs/261
> +++ b/tests/xfs/261
> @@ -71,13 +71,13 @@ _check() {
>  	# Set up a private mount table file, then try out a simple quota
>  	# command to show mounts
>  	_setup_my_mtab
> -	echo print | xfs_quota	-t "${my_mtab}" > /dev/null || exit
> +	echo print | $XFS_QUOTA_PROG -t "${my_mtab}" > /dev/null || exit
>  
>  	# Do the same simple quota command after adding a bogus entry to the
>  	# mount table.  Old code will bail on this because it has trouble
>  	# with the bogus entry.
>  	_perturb_my_mtab
> -	echo print | xfs_quota -t "${my_mtab}" > /dev/null || exit
> +	echo print | $XFS_QUOTA_PROG -t "${my_mtab}" > /dev/null || exit
>  }
>  
>  #########
> diff --git a/tests/xfs/303 b/tests/xfs/303
> index b2e5668c..6aafae85 100755
> --- a/tests/xfs/303
> +++ b/tests/xfs/303
> @@ -24,13 +24,13 @@ echo "Silence is golden"
>  # An non-existent xfs mount point
>  INVALID_PATH="/INVALID_XFS_MOUNT_POINT"
>  
> -xfs_quota -x -c 'report -a' $INVALID_PATH	2>/dev/null
> -xfs_quota -x -c 'state -a' $INVALID_PATH	2>/dev/null
> -xfs_quota -x -c 'free -h' $INVALID_PATH		2>/dev/null
> -xfs_quota -x -c 'quot -v' $INVALID_PATH		2>/dev/null
> -xfs_quota -x -c 'remove' $INALID_PATH		2>/dev/null
> -xfs_quota -x -c 'disable' $INVALID_PATH		2>/dev/null
> -xfs_quota -x -c 'enable' $INVALID_PATH		2>/dev/null
> +$XFS_QUOTA_PROG -x -c 'report -a' $INVALID_PATH	2>/dev/null
> +$XFS_QUOTA_PROG -x -c 'state -a' $INVALID_PATH	2>/dev/null
> +$XFS_QUOTA_PROG -x -c 'free -h' $INVALID_PATH		2>/dev/null
> +$XFS_QUOTA_PROG -x -c 'quot -v' $INVALID_PATH		2>/dev/null
> +$XFS_QUOTA_PROG -x -c 'remove' $INALID_PATH		2>/dev/null
> +$XFS_QUOTA_PROG -x -c 'disable' $INVALID_PATH		2>/dev/null
> +$XFS_QUOTA_PROG -x -c 'enable' $INVALID_PATH		2>/dev/null
>  
>  # success, all done
>  status=0
> diff --git a/tests/xfs/304 b/tests/xfs/304
> index 91fa5d97..3c38e613 100755
> --- a/tests/xfs/304
> +++ b/tests/xfs/304
> @@ -31,7 +31,7 @@ QUOTA_DIR=$SCRATCH_MNT/quota_dir
>  
>  mkdir -p $QUOTA_DIR
>  echo "*** turn off group quotas"
> -xfs_quota -x -c 'disable -g' $SCRATCH_MNT
> +$XFS_QUOTA_PROG -x -c 'disable -g' $SCRATCH_MNT
>  rmdir $QUOTA_DIR
>  echo "*** umount"
>  _scratch_unmount
> @@ -39,7 +39,7 @@ _scratch_unmount
>  _qmount
>  mkdir -p $QUOTA_DIR
>  echo "*** turn off project quotas"
> -xfs_quota -x -c 'disable -p' $SCRATCH_MNT
> +$XFS_QUOTA_PROG -x -c 'disable -p' $SCRATCH_MNT
>  rmdir $QUOTA_DIR
>  echo "*** umount"
>  _scratch_unmount
> @@ -47,7 +47,7 @@ _scratch_unmount
>  _qmount
>  mkdir -p $QUOTA_DIR
>  echo "*** turn off group/project quotas"
> -xfs_quota -x -c 'disable -gp' $SCRATCH_MNT
> +$XFS_QUOTA_PROG -x -c 'disable -gp' $SCRATCH_MNT
>  rmdir $QUOTA_DIR
>  echo "*** umount"
>  _scratch_unmount
> diff --git a/tests/xfs/305 b/tests/xfs/305
> index 0b89499a..41c7b7f8 100755
> --- a/tests/xfs/305
> +++ b/tests/xfs/305
> @@ -38,7 +38,7 @@ _exercise()
>  
>  	$FSSTRESS_PROG -d $QUOTA_DIR -n 1000000 -p 100 $FSSTRESS_AVOID >/dev/null 2>&1 &
>  	sleep 10
> -	xfs_quota -x -c "disable -$type" $SCRATCH_DEV
> +	$XFS_QUOTA_PROG -x -c "disable -$type" $SCRATCH_DEV
>  	sleep 5
>  	$KILLALL_PROG -q $FSSTRESS_PROG
>  	wait
> -- 
> 2.30.2
>
Darrick J. Wong July 22, 2021, 11:17 p.m. UTC | #2
On Thu, Jul 22, 2021 at 11:25:14AM -0700, Darrick J. Wong wrote:
> On Thu, Jul 22, 2021 at 09:38:32AM +0200, Christoph Hellwig wrote:
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
> 
> Nice!!
> Reviewed-by: Darrick J. Wong <djwong@kernel.org>

OFC now that I applied it I noticed that you forgot xfs/107.

--D

diff --git a/tests/xfs/107 b/tests/xfs/107
index ce131a77..da052290 100755
--- a/tests/xfs/107
+++ b/tests/xfs/107
@@ -85,17 +85,17 @@ $FSSTRESS_PROG -z -s 47806 -m 8 -n 500 -p 4 \
 QARGS="-x -D $tmp.projects -P /dev/null $SCRATCH_MNT"
 
 echo "### initial report"
-xfs_quota -c 'quot -p' -c 'quota -ip 6' $QARGS | filter_xfs_quota
+$XFS_QUOTA_PROG -c 'quot -p' -c 'quota -ip 6' $QARGS | filter_xfs_quota
 
 echo "### check the project, should give warnings"
-xfs_quota -c 'project -c 6' $QARGS | LC_COLLATE=POSIX sort | filter_xfs_quota
+$XFS_QUOTA_PROG -c 'project -c 6' $QARGS | LC_COLLATE=POSIX sort | filter_xfs_quota
 
 echo "### recursively setup the project"
-xfs_quota -c 'project -s 6' $QARGS | LC_COLLATE=POSIX sort | filter_xfs_quota
-xfs_quota -c 'quota -ip 6' $QARGS | filter_xfs_quota
+$XFS_QUOTA_PROG -c 'project -s 6' $QARGS | LC_COLLATE=POSIX sort | filter_xfs_quota
+$XFS_QUOTA_PROG -c 'quota -ip 6' $QARGS | filter_xfs_quota
 
 echo "### check the project, should give no warnings now"
-xfs_quota -c 'project -c 6' $QARGS | LC_COLLATE=POSIX sort | filter_xfs_quota
+$XFS_QUOTA_PROG -c 'project -c 6' $QARGS | LC_COLLATE=POSIX sort | filter_xfs_quota
 
 echo "### deny a hard link - wrong project ID"
 rm -f $SCRATCH_MNT/outer $target/inner
@@ -107,7 +107,7 @@ if [ $? -eq 0 ]; then
 else
 	echo hard link failed
 fi
-xfs_quota -c 'quota -ip 6' $QARGS | filter_xfs_quota
+$XFS_QUOTA_PROG -c 'quota -ip 6' $QARGS | filter_xfs_quota
 
 echo "### allow a hard link - right project ID"
 $XFS_IO_PROG -c 'chproj 6' $SCRATCH_MNT/outer
@@ -118,12 +118,12 @@ else
 	echo hard link failed
 	ls -ld $SCRATCH_MNT/outer $target/inner
 fi
-xfs_quota -c 'quota -ip 6' $QARGS | filter_xfs_quota
+$XFS_QUOTA_PROG -c 'quota -ip 6' $QARGS | filter_xfs_quota
 
 echo "### recursively clear the project"
-xfs_quota -c 'project -C 6' $QARGS | LC_COLLATE=POSIX sort | filter_xfs_quota
+$XFS_QUOTA_PROG -c 'project -C 6' $QARGS | LC_COLLATE=POSIX sort | filter_xfs_quota
 #no output...
-xfs_quota -c 'quota -ip 6' $QARGS | filter_xfs_quota
+$XFS_QUOTA_PROG -c 'quota -ip 6' $QARGS | filter_xfs_quota
 
 status=0
 exit
Eryu Guan July 25, 2021, 3:02 p.m. UTC | #3
On Thu, Jul 22, 2021 at 04:17:07PM -0700, Darrick J. Wong wrote:
> On Thu, Jul 22, 2021 at 11:25:14AM -0700, Darrick J. Wong wrote:
> > On Thu, Jul 22, 2021 at 09:38:32AM +0200, Christoph Hellwig wrote:
> > > Signed-off-by: Christoph Hellwig <hch@lst.de>
> > 
> > Nice!!
> > Reviewed-by: Darrick J. Wong <djwong@kernel.org>
> 
> OFC now that I applied it I noticed that you forgot xfs/107.

I updated xfs/107 and folded it into this patch. Thanks for all the
reviews!

Eryu

> 
> --D
> 
> diff --git a/tests/xfs/107 b/tests/xfs/107
> index ce131a77..da052290 100755
> --- a/tests/xfs/107
> +++ b/tests/xfs/107
> @@ -85,17 +85,17 @@ $FSSTRESS_PROG -z -s 47806 -m 8 -n 500 -p 4 \
>  QARGS="-x -D $tmp.projects -P /dev/null $SCRATCH_MNT"
>  
>  echo "### initial report"
> -xfs_quota -c 'quot -p' -c 'quota -ip 6' $QARGS | filter_xfs_quota
> +$XFS_QUOTA_PROG -c 'quot -p' -c 'quota -ip 6' $QARGS | filter_xfs_quota
>  
>  echo "### check the project, should give warnings"
> -xfs_quota -c 'project -c 6' $QARGS | LC_COLLATE=POSIX sort | filter_xfs_quota
> +$XFS_QUOTA_PROG -c 'project -c 6' $QARGS | LC_COLLATE=POSIX sort | filter_xfs_quota
>  
>  echo "### recursively setup the project"
> -xfs_quota -c 'project -s 6' $QARGS | LC_COLLATE=POSIX sort | filter_xfs_quota
> -xfs_quota -c 'quota -ip 6' $QARGS | filter_xfs_quota
> +$XFS_QUOTA_PROG -c 'project -s 6' $QARGS | LC_COLLATE=POSIX sort | filter_xfs_quota
> +$XFS_QUOTA_PROG -c 'quota -ip 6' $QARGS | filter_xfs_quota
>  
>  echo "### check the project, should give no warnings now"
> -xfs_quota -c 'project -c 6' $QARGS | LC_COLLATE=POSIX sort | filter_xfs_quota
> +$XFS_QUOTA_PROG -c 'project -c 6' $QARGS | LC_COLLATE=POSIX sort | filter_xfs_quota
>  
>  echo "### deny a hard link - wrong project ID"
>  rm -f $SCRATCH_MNT/outer $target/inner
> @@ -107,7 +107,7 @@ if [ $? -eq 0 ]; then
>  else
>  	echo hard link failed
>  fi
> -xfs_quota -c 'quota -ip 6' $QARGS | filter_xfs_quota
> +$XFS_QUOTA_PROG -c 'quota -ip 6' $QARGS | filter_xfs_quota
>  
>  echo "### allow a hard link - right project ID"
>  $XFS_IO_PROG -c 'chproj 6' $SCRATCH_MNT/outer
> @@ -118,12 +118,12 @@ else
>  	echo hard link failed
>  	ls -ld $SCRATCH_MNT/outer $target/inner
>  fi
> -xfs_quota -c 'quota -ip 6' $QARGS | filter_xfs_quota
> +$XFS_QUOTA_PROG -c 'quota -ip 6' $QARGS | filter_xfs_quota
>  
>  echo "### recursively clear the project"
> -xfs_quota -c 'project -C 6' $QARGS | LC_COLLATE=POSIX sort | filter_xfs_quota
> +$XFS_QUOTA_PROG -c 'project -C 6' $QARGS | LC_COLLATE=POSIX sort | filter_xfs_quota
>  #no output...
> -xfs_quota -c 'quota -ip 6' $QARGS | filter_xfs_quota
> +$XFS_QUOTA_PROG -c 'quota -ip 6' $QARGS | filter_xfs_quota
>  
>  status=0
>  exit
diff mbox series

Patch

diff --git a/tests/xfs/007 b/tests/xfs/007
index d1946524..66f1f101 100755
--- a/tests/xfs/007
+++ b/tests/xfs/007
@@ -40,11 +40,11 @@  do_test()
 
 	_qmount
 	echo "*** turn off $off_opts quotas"
-	xfs_quota -x -c "off -$off_opts" $SCRATCH_MNT
+	$XFS_QUOTA_PROG -x -c "off -$off_opts" $SCRATCH_MNT
 	_scratch_unmount
 	_qmount_option ""
 	_scratch_mount
-	xfs_quota -x -c "remove -$off_opts" $SCRATCH_MNT
+	$XFS_QUOTA_PROG -x -c "remove -$off_opts" $SCRATCH_MNT
 	echo "*** umount"
 	_scratch_unmount
 
diff --git a/tests/xfs/052 b/tests/xfs/052
index 010f9ad6..75761022 100755
--- a/tests/xfs/052
+++ b/tests/xfs/052
@@ -63,13 +63,13 @@  bsoft=1001
 bhard=1001
 isoft=10
 ihard=10
-xfs_quota -x \
+$XFS_QUOTA_PROG -x \
 	-c "limit -$type bsoft=${bsoft}k bhard=${bhard}k $id" \
 	-c "limit -$type isoft=$isoft ihard=$ihard $id" \
 	$SCRATCH_DEV
 
 # cross check blks, softblks, hardblks <-> quota, xfs_db
-xfs_quota -c "quota -$type -birnN $id" $SCRATCH_DEV |
+$XFS_QUOTA_PROG -c "quota -$type -birnN $id" $SCRATCH_DEV |
 			tr -d '\n' | tr -s '[:space:]' | tee -a $seqres.full |
 	perl -ne 'if (m[^\s*'$SCRATCH_DEV'\s+(\d+)\s+(\d+)\s+(\d+)]) {
 		print "used_blocks=", $1, "\n";
diff --git a/tests/xfs/108 b/tests/xfs/108
index 0af22443..8a102133 100755
--- a/tests/xfs/108
+++ b/tests/xfs/108
@@ -47,9 +47,9 @@  test_accounting()
 	for file in $SCRATCH_MNT/{buffer,direct,mmap}; do
 		$here/src/lstat64 $file | head -3 | _filter_scratch
 	done
-	xfs_quota -c "quota -hnb -$type $id" $QARGS | _filter_quota
-	xfs_quota -c "quota -hni -$type $id" $QARGS | _filter_quota
-	xfs_quota -c "quota -hnr -$type $id" $QARGS | _filter_quota
+	$XFS_QUOTA_PROG -c "quota -hnb -$type $id" $QARGS | _filter_quota
+	$XFS_QUOTA_PROG -c "quota -hni -$type $id" $QARGS | _filter_quota
+	$XFS_QUOTA_PROG -c "quota -hnr -$type $id" $QARGS | _filter_quota
 }
 
 export MOUNT_OPTIONS="-opquota"
diff --git a/tests/xfs/220 b/tests/xfs/220
index c847a0dc..241a7abd 100755
--- a/tests/xfs/220
+++ b/tests/xfs/220
@@ -41,7 +41,7 @@  _scratch_mkfs_xfs >/dev/null 2>&1
 _scratch_mount -o uquota
 
 # turn off quota
-xfs_quota -x -c off $SCRATCH_DEV
+$XFS_QUOTA_PROG -x -c off $SCRATCH_DEV
 
 # and unmount (this used to crash)
 _scratch_unmount
@@ -58,7 +58,7 @@  _scratch_mount -o uquota
 # The sed expression below replaces a notrun to cater for kernels that have
 # removed the ability to disable quota accounting at runtime.  On those
 # kernel this test is rather useless, and in a few years we can drop it.
-xfs_quota -x -c off -c remove $SCRATCH_DEV 2>&1 | \
+$XFS_QUOTA_PROG -x -c off -c remove $SCRATCH_DEV 2>&1 | \
 	sed -e '/XFS_QUOTARM: Invalid argument/d'
 
 # and unmount again
diff --git a/tests/xfs/261 b/tests/xfs/261
index 3b58db8d..eb8a72cd 100755
--- a/tests/xfs/261
+++ b/tests/xfs/261
@@ -71,13 +71,13 @@  _check() {
 	# Set up a private mount table file, then try out a simple quota
 	# command to show mounts
 	_setup_my_mtab
-	echo print | xfs_quota	-t "${my_mtab}" > /dev/null || exit
+	echo print | $XFS_QUOTA_PROG -t "${my_mtab}" > /dev/null || exit
 
 	# Do the same simple quota command after adding a bogus entry to the
 	# mount table.  Old code will bail on this because it has trouble
 	# with the bogus entry.
 	_perturb_my_mtab
-	echo print | xfs_quota -t "${my_mtab}" > /dev/null || exit
+	echo print | $XFS_QUOTA_PROG -t "${my_mtab}" > /dev/null || exit
 }
 
 #########
diff --git a/tests/xfs/303 b/tests/xfs/303
index b2e5668c..6aafae85 100755
--- a/tests/xfs/303
+++ b/tests/xfs/303
@@ -24,13 +24,13 @@  echo "Silence is golden"
 # An non-existent xfs mount point
 INVALID_PATH="/INVALID_XFS_MOUNT_POINT"
 
-xfs_quota -x -c 'report -a' $INVALID_PATH	2>/dev/null
-xfs_quota -x -c 'state -a' $INVALID_PATH	2>/dev/null
-xfs_quota -x -c 'free -h' $INVALID_PATH		2>/dev/null
-xfs_quota -x -c 'quot -v' $INVALID_PATH		2>/dev/null
-xfs_quota -x -c 'remove' $INALID_PATH		2>/dev/null
-xfs_quota -x -c 'disable' $INVALID_PATH		2>/dev/null
-xfs_quota -x -c 'enable' $INVALID_PATH		2>/dev/null
+$XFS_QUOTA_PROG -x -c 'report -a' $INVALID_PATH	2>/dev/null
+$XFS_QUOTA_PROG -x -c 'state -a' $INVALID_PATH	2>/dev/null
+$XFS_QUOTA_PROG -x -c 'free -h' $INVALID_PATH		2>/dev/null
+$XFS_QUOTA_PROG -x -c 'quot -v' $INVALID_PATH		2>/dev/null
+$XFS_QUOTA_PROG -x -c 'remove' $INALID_PATH		2>/dev/null
+$XFS_QUOTA_PROG -x -c 'disable' $INVALID_PATH		2>/dev/null
+$XFS_QUOTA_PROG -x -c 'enable' $INVALID_PATH		2>/dev/null
 
 # success, all done
 status=0
diff --git a/tests/xfs/304 b/tests/xfs/304
index 91fa5d97..3c38e613 100755
--- a/tests/xfs/304
+++ b/tests/xfs/304
@@ -31,7 +31,7 @@  QUOTA_DIR=$SCRATCH_MNT/quota_dir
 
 mkdir -p $QUOTA_DIR
 echo "*** turn off group quotas"
-xfs_quota -x -c 'disable -g' $SCRATCH_MNT
+$XFS_QUOTA_PROG -x -c 'disable -g' $SCRATCH_MNT
 rmdir $QUOTA_DIR
 echo "*** umount"
 _scratch_unmount
@@ -39,7 +39,7 @@  _scratch_unmount
 _qmount
 mkdir -p $QUOTA_DIR
 echo "*** turn off project quotas"
-xfs_quota -x -c 'disable -p' $SCRATCH_MNT
+$XFS_QUOTA_PROG -x -c 'disable -p' $SCRATCH_MNT
 rmdir $QUOTA_DIR
 echo "*** umount"
 _scratch_unmount
@@ -47,7 +47,7 @@  _scratch_unmount
 _qmount
 mkdir -p $QUOTA_DIR
 echo "*** turn off group/project quotas"
-xfs_quota -x -c 'disable -gp' $SCRATCH_MNT
+$XFS_QUOTA_PROG -x -c 'disable -gp' $SCRATCH_MNT
 rmdir $QUOTA_DIR
 echo "*** umount"
 _scratch_unmount
diff --git a/tests/xfs/305 b/tests/xfs/305
index 0b89499a..41c7b7f8 100755
--- a/tests/xfs/305
+++ b/tests/xfs/305
@@ -38,7 +38,7 @@  _exercise()
 
 	$FSSTRESS_PROG -d $QUOTA_DIR -n 1000000 -p 100 $FSSTRESS_AVOID >/dev/null 2>&1 &
 	sleep 10
-	xfs_quota -x -c "disable -$type" $SCRATCH_DEV
+	$XFS_QUOTA_PROG -x -c "disable -$type" $SCRATCH_DEV
 	sleep 5
 	$KILLALL_PROG -q $FSSTRESS_PROG
 	wait