* [PATCH] xfstests: optionally run all tests under quota
@ 2010-02-09 19:26 ` Eric Sandeen
0 siblings, 0 replies; 8+ messages in thread
From: Eric Sandeen @ 2010-02-09 19:26 UTC (permalink / raw)
To: xfs-oss; +Cc: ext4 development
This patch might be a little heavy handed, but it seems to
work; if you set USE_QUOTA=1 in your environment, all
tests should be run with quota on and enabled.
This will hopefully help shake out some of the ext4
quota problems, although one needs to keep an eye
on the console to see whether warnings scroll by.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/common.rc b/common.rc
index 6424871..4fde921 100644
--- a/common.rc
+++ b/common.rc
@@ -64,6 +64,9 @@ _mount_opts()
*)
;;
esac
+ if [ ! -z "$USE_QUOTA" ]; then
+ export MOUNT_OPTIONS="$MOUNT_OPTIONS -o usrquota,grpquota"
+ fi
}
_mkfs_opts()
@@ -161,6 +164,10 @@ _test_options()
type=$1
TEST_OPTIONS=""
+ if [ ! -z "$USE_QUOTA" ]; then
+ TEST_OPTIONS="-o usrquota,grpquota"
+ fi
+
if [ "$FSTYP" != "xfs" ]; then
return
fi
@@ -202,6 +209,25 @@ _mount_ops_filter()
}
+_setup_quota()
+{
+ mountpoint=$1
+ if [ ! -z "$USE_QUOTA" ]; then
+ case $FSTYP in
+ xfs)
+ ;;
+ ext*|reiserfs)
+ quotaoff $mountpoint &>/dev/null
+ quotacheck -u -g $mountpoint
+ quotaon $mountpoint
+ ;;
+ *)
+ _fail "Don't know how to turn on quota on $FSTYP"
+ ;;
+ esac
+ fi
+}
+
_scratch_mount_options()
{
_scratch_options mount
@@ -212,6 +238,7 @@ _scratch_mount_options()
_scratch_mount()
{
_mount -t $FSTYP `_scratch_mount_options $*`
+ _setup_quota $SCRATCH_MNT
}
_scratch_unmount()
@@ -229,6 +256,7 @@ _test_mount()
{
_test_options mount
_mount -t $FSTYP $TEST_OPTIONS $TEST_FS_MOUNT_OPTS $* $TEST_DEV $TEST_DIR
+ _setup_quota $TEST_DIR
}
_scratch_mkfs_options()
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] xfstests: optionally run all tests under quota
@ 2010-02-09 19:26 ` Eric Sandeen
0 siblings, 0 replies; 8+ messages in thread
From: Eric Sandeen @ 2010-02-09 19:26 UTC (permalink / raw)
To: xfs-oss; +Cc: ext4 development
This patch might be a little heavy handed, but it seems to
work; if you set USE_QUOTA=1 in your environment, all
tests should be run with quota on and enabled.
This will hopefully help shake out some of the ext4
quota problems, although one needs to keep an eye
on the console to see whether warnings scroll by.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/common.rc b/common.rc
index 6424871..4fde921 100644
--- a/common.rc
+++ b/common.rc
@@ -64,6 +64,9 @@ _mount_opts()
*)
;;
esac
+ if [ ! -z "$USE_QUOTA" ]; then
+ export MOUNT_OPTIONS="$MOUNT_OPTIONS -o usrquota,grpquota"
+ fi
}
_mkfs_opts()
@@ -161,6 +164,10 @@ _test_options()
type=$1
TEST_OPTIONS=""
+ if [ ! -z "$USE_QUOTA" ]; then
+ TEST_OPTIONS="-o usrquota,grpquota"
+ fi
+
if [ "$FSTYP" != "xfs" ]; then
return
fi
@@ -202,6 +209,25 @@ _mount_ops_filter()
}
+_setup_quota()
+{
+ mountpoint=$1
+ if [ ! -z "$USE_QUOTA" ]; then
+ case $FSTYP in
+ xfs)
+ ;;
+ ext*|reiserfs)
+ quotaoff $mountpoint &>/dev/null
+ quotacheck -u -g $mountpoint
+ quotaon $mountpoint
+ ;;
+ *)
+ _fail "Don't know how to turn on quota on $FSTYP"
+ ;;
+ esac
+ fi
+}
+
_scratch_mount_options()
{
_scratch_options mount
@@ -212,6 +238,7 @@ _scratch_mount_options()
_scratch_mount()
{
_mount -t $FSTYP `_scratch_mount_options $*`
+ _setup_quota $SCRATCH_MNT
}
_scratch_unmount()
@@ -229,6 +256,7 @@ _test_mount()
{
_test_options mount
_mount -t $FSTYP $TEST_OPTIONS $TEST_FS_MOUNT_OPTS $* $TEST_DEV $TEST_DIR
+ _setup_quota $TEST_DIR
}
_scratch_mkfs_options()
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] xfstests: optionally run all tests under quota
2010-02-09 19:26 ` Eric Sandeen
@ 2010-02-09 22:04 ` Christoph Hellwig
-1 siblings, 0 replies; 8+ messages in thread
From: Christoph Hellwig @ 2010-02-09 22:04 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfs-oss, ext4 development
On Tue, Feb 09, 2010 at 01:26:31PM -0600, Eric Sandeen wrote:
> This patch might be a little heavy handed, but it seems to
> work; if you set USE_QUOTA=1 in your environment, all
> tests should be run with quota on and enabled.
I'd rather prefer a -quota option to ./check than a magic
environment variable.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] xfstests: optionally run all tests under quota
@ 2010-02-09 22:04 ` Christoph Hellwig
0 siblings, 0 replies; 8+ messages in thread
From: Christoph Hellwig @ 2010-02-09 22:04 UTC (permalink / raw)
To: Eric Sandeen; +Cc: ext4 development, xfs-oss
On Tue, Feb 09, 2010 at 01:26:31PM -0600, Eric Sandeen wrote:
> This patch might be a little heavy handed, but it seems to
> work; if you set USE_QUOTA=1 in your environment, all
> tests should be run with quota on and enabled.
I'd rather prefer a -quota option to ./check than a magic
environment variable.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: xfstests: optionally run all tests under quota
2010-02-09 19:26 ` Eric Sandeen
@ 2012-10-26 16:49 ` Rich Johnston
-1 siblings, 0 replies; 8+ messages in thread
From: Rich Johnston @ 2012-10-26 16:49 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfs-oss, ext4 development
On 02/09/2010 01:26 PM, Eric Sandeen wrote:
> This patch might be a little heavy handed, but it seems to
> work; if you set USE_QUOTA=1 in your environment, all
> tests should be run with quota on and enabled.
>
> This will hopefully help shake out some of the ext4
> quota problems, although one needs to keep an eye
> on the console to see whether warnings scroll by.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
>
> ---
>
>
> diff --git a/common.rc b/common.rc
> index 6424871..4fde921 100644
> --- a/common.rc
> +++ b/common.rc
Looks good
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Eric,
This patch has been committed to git://oss.sgi.com/xfs/cmds/xfstests,
master branch, commit ID edd6bcf9.
Thanks
--Rich
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: xfstests: optionally run all tests under quota
@ 2012-10-26 16:49 ` Rich Johnston
0 siblings, 0 replies; 8+ messages in thread
From: Rich Johnston @ 2012-10-26 16:49 UTC (permalink / raw)
To: Eric Sandeen; +Cc: ext4 development, xfs-oss
On 02/09/2010 01:26 PM, Eric Sandeen wrote:
> This patch might be a little heavy handed, but it seems to
> work; if you set USE_QUOTA=1 in your environment, all
> tests should be run with quota on and enabled.
>
> This will hopefully help shake out some of the ext4
> quota problems, although one needs to keep an eye
> on the console to see whether warnings scroll by.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
>
> ---
>
>
> diff --git a/common.rc b/common.rc
> index 6424871..4fde921 100644
> --- a/common.rc
> +++ b/common.rc
Looks good
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Eric,
This patch has been committed to git://oss.sgi.com/xfs/cmds/xfstests,
master branch, commit ID edd6bcf9.
Thanks
--Rich
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: xfstests: optionally run all tests under quota
2012-10-26 16:49 ` Rich Johnston
@ 2012-11-05 9:56 ` Dave Chinner
-1 siblings, 0 replies; 8+ messages in thread
From: Dave Chinner @ 2012-11-05 9:56 UTC (permalink / raw)
To: Rich Johnston; +Cc: Eric Sandeen, xfs-oss, ext4 development
On Fri, Oct 26, 2012 at 11:49:18AM -0500, Rich Johnston wrote:
> On 02/09/2010 01:26 PM, Eric Sandeen wrote:
> >This patch might be a little heavy handed, but it seems to
> >work; if you set USE_QUOTA=1 in your environment, all
> >tests should be run with quota on and enabled.
> >
> >This will hopefully help shake out some of the ext4
> >quota problems, although one needs to keep an eye
> >on the console to see whether warnings scroll by.
> >
> >Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> >
> >---
> >
> >
> >diff --git a/common.rc b/common.rc
> >index 6424871..4fde921 100644
> >--- a/common.rc
> >+++ b/common.rc
>
> Looks good
>
> Reviewed-by: Rich Johnston <rjohnston@sgi.com>
>
> Eric,
>
> This patch has been committed to
> git://oss.sgi.com/xfs/cmds/xfstests, master branch, commit ID
> edd6bcf9.
And here's the problem with committing 2 year old patches without
review:
$ grep "Can't initialize the DMAPI" [0-9]* | uniq
142.out.bad:Can't initialize the DMAPI
143.out.bad:Can't initialize the DMAPI
144.out.bad:Can't initialize the DMAPI
145.out.bad:Can't initialize the DMAPI
146.out.bad:Can't initialize the DMAPI
147.out.bad:Can't initialize the DMAPI
150.out.bad:Can't initialize the DMAPI
155.out.bad:Can't initialize the DMAPI
156.out.bad:Can't initialize the DMAPI
157.out.bad:Can't initialize the DMAPI
158.out.bad:Can't initialize the DMAPI
161.out.bad:Can't initialize the DMAPI
168.out.bad:Can't initialize the DMAPI
175.out.bad:Can't initialize the DMAPI
176.out.bad:Can't initialize the DMAPI
185.out.bad:Can't initialize the DMAPI
This breaks the dmapi mount error detection, and hence whether dmapi
is enabled or not in the kernel. The problem is this:
@@ -251,6 +277,7 @@ _scratch_mount_options()
_scratch_mount()
{
_mount -t $FSTYP `_scratch_mount_options $*`
+ _setup_quota $SCRATCH_MNT
}
means that callers no longer can check is the mount succeeded or not
by looking at the return of _scratch_mount(). Hence this code:
_dmapi_scratch_mount () {
if [ `echo "$MOUNT_OPTIONS" | grep -c dmapi` -gt 0 -o \
`echo "$MOUNT_OPTIONS" | grep -c dmi` -gt 0 ] ; then
#already got dmapi options set
_scratch_mount
dmapi_mount_result=$?
else
_scratch_mount "-o dmapi,mtpt=$SCRATCH_MNT"
dmapi_mount_result=$?
fi
if [ $dmapi_mount_result -ne 0 ] ; then
_notrun "Assuming DMAPI modules are not loaded"
fi
}
now fails to detect that mounts fail.
Can we revert this commit for now? If we really need this
functionality someone can fix the original patch and re-propose it...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: xfstests: optionally run all tests under quota
@ 2012-11-05 9:56 ` Dave Chinner
0 siblings, 0 replies; 8+ messages in thread
From: Dave Chinner @ 2012-11-05 9:56 UTC (permalink / raw)
To: Rich Johnston; +Cc: Eric Sandeen, ext4 development, xfs-oss
On Fri, Oct 26, 2012 at 11:49:18AM -0500, Rich Johnston wrote:
> On 02/09/2010 01:26 PM, Eric Sandeen wrote:
> >This patch might be a little heavy handed, but it seems to
> >work; if you set USE_QUOTA=1 in your environment, all
> >tests should be run with quota on and enabled.
> >
> >This will hopefully help shake out some of the ext4
> >quota problems, although one needs to keep an eye
> >on the console to see whether warnings scroll by.
> >
> >Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> >
> >---
> >
> >
> >diff --git a/common.rc b/common.rc
> >index 6424871..4fde921 100644
> >--- a/common.rc
> >+++ b/common.rc
>
> Looks good
>
> Reviewed-by: Rich Johnston <rjohnston@sgi.com>
>
> Eric,
>
> This patch has been committed to
> git://oss.sgi.com/xfs/cmds/xfstests, master branch, commit ID
> edd6bcf9.
And here's the problem with committing 2 year old patches without
review:
$ grep "Can't initialize the DMAPI" [0-9]* | uniq
142.out.bad:Can't initialize the DMAPI
143.out.bad:Can't initialize the DMAPI
144.out.bad:Can't initialize the DMAPI
145.out.bad:Can't initialize the DMAPI
146.out.bad:Can't initialize the DMAPI
147.out.bad:Can't initialize the DMAPI
150.out.bad:Can't initialize the DMAPI
155.out.bad:Can't initialize the DMAPI
156.out.bad:Can't initialize the DMAPI
157.out.bad:Can't initialize the DMAPI
158.out.bad:Can't initialize the DMAPI
161.out.bad:Can't initialize the DMAPI
168.out.bad:Can't initialize the DMAPI
175.out.bad:Can't initialize the DMAPI
176.out.bad:Can't initialize the DMAPI
185.out.bad:Can't initialize the DMAPI
This breaks the dmapi mount error detection, and hence whether dmapi
is enabled or not in the kernel. The problem is this:
@@ -251,6 +277,7 @@ _scratch_mount_options()
_scratch_mount()
{
_mount -t $FSTYP `_scratch_mount_options $*`
+ _setup_quota $SCRATCH_MNT
}
means that callers no longer can check is the mount succeeded or not
by looking at the return of _scratch_mount(). Hence this code:
_dmapi_scratch_mount () {
if [ `echo "$MOUNT_OPTIONS" | grep -c dmapi` -gt 0 -o \
`echo "$MOUNT_OPTIONS" | grep -c dmi` -gt 0 ] ; then
#already got dmapi options set
_scratch_mount
dmapi_mount_result=$?
else
_scratch_mount "-o dmapi,mtpt=$SCRATCH_MNT"
dmapi_mount_result=$?
fi
if [ $dmapi_mount_result -ne 0 ] ; then
_notrun "Assuming DMAPI modules are not loaded"
fi
}
now fails to detect that mounts fail.
Can we revert this commit for now? If we really need this
functionality someone can fix the original patch and re-propose it...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-11-05 9:56 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-09 19:26 [PATCH] xfstests: optionally run all tests under quota Eric Sandeen
2010-02-09 19:26 ` Eric Sandeen
2010-02-09 22:04 ` Christoph Hellwig
2010-02-09 22:04 ` Christoph Hellwig
2012-10-26 16:49 ` Rich Johnston
2012-10-26 16:49 ` Rich Johnston
2012-11-05 9:56 ` Dave Chinner
2012-11-05 9:56 ` Dave Chinner
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.