All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Eryu Guan <eguan@redhat.com>
Cc: Eric Sandeen <sandeen@redhat.com>, fstests <fstests@vger.kernel.org>
Subject: Re: [PATCH 2/3] modify xfs/ quota tests to work on generic filesystems
Date: Wed, 21 Sep 2016 08:02:39 -0500	[thread overview]
Message-ID: <a9112b04-17a3-dbdc-7c19-b2490875b6fd@sandeen.net> (raw)
In-Reply-To: <20160921093721.GK27776@eguan.usersys.redhat.com>

On 9/21/16 4:37 AM, Eryu Guan wrote:
> On Tue, Sep 20, 2016 at 05:21:46PM -0500, Eric Sandeen wrote:
>> Fix several xfs quota tests to work on non-xfs filesystems.
>>
>> New _require function to be sure that the xfs_quota tool can operate
>> on foreign filesystems; if it can, and if it needs to, it adds "-f"
>> to the XFS_QUOTA_PROG variable.
>>
>> Modify _qmount to do quotacheck/quotaon to mount and /enable/
>> quota.  On xfs this isn't needed and/or fails; it's ignored.
>>
>> All quota-related options used as arguments to _qmount are changed
>> from i.e. uquota to i.e. usrquota; the latter is standard across
>> almost all linux filesytems, including xfs.
>>
>> xfs/260 filters out the root/default quota line, because ext4
>> consumes a different amount of space than xfs, and it's not what
>> we're testing for, so just ignore it.
>>
>> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
>> ---
>>
>> diff --git a/common/quota b/common/quota
>> index d91062a..2ec56a5 100644
>> --- a/common/quota
>> +++ b/common/quota
>> @@ -78,6 +78,19 @@ _require_xfs_quota()
>>  }
>>  
>>  #
>> +# checks that xfs_quota can operate on foreign (non-xfs) filesystems
>> +# Skips check on xfs filesystems, old xfs_quota is fine there.
>> +# Appends "-f" to enable foreign behavior on non-xfs filesystems if available.
>> +#
>> +_require_xfs_quota_foreign()
>> +{
>> +    if [ "$FSTYP" != "xfs" ]; then
>> +	$XFS_QUOTA_PROG -f -V &>/dev/null || \
>> +		_notrun "xfs_quota binary does not support foreign filesystems"
>> +	XFS_QUOTA_PROG="$XFS_QUOTA_PROG -f"
>> +    fi
> 
> Mixing space and tab in this function.

yep -

As do the functions before and after it - are we going with a strict
rule now or going for consistency with the rest of the code?

If you really want a strict tabs-only rule I'd suggest re-tabbing the
entire file to avoid this coming up over and over.  :)

>> +}
> 
> Better to have an empty line here :)

Yep :)

>> +#
>>  # checks that the XFS project quota support in the kernel is enabled.
>>  #
>>  _require_prjquota()
> 
> [snip]
> 
>> diff --git a/tests/xfs/118 b/tests/xfs/118
>> index 8414594..da18a32 100755
>> --- a/tests/xfs/118
>> +++ b/tests/xfs/118
>> @@ -47,11 +47,12 @@ _cleanup()
>>  # real QA test starts here
>>  
>>  # Modify as appropriate.
>> -_supported_fs xfs
>> +_supported_fs generic
>>  _supported_os IRIX Linux
>>  
>>  _require_scratch
>> -_require_xfs_quota
>> +_require_quota
>> +_require_xfs_quota_foreign
>>  
>>  _chowning_file()
>>  {
>> @@ -72,10 +73,10 @@ _chowning_file()
>>  }
>>  
>>  echo "mkfs on scratch"
>> -_scratch_mkfs_xfs >$seqres.full
>> +_scratch_mkfs >$seqres.full
> 
> I found that stderr should be redirected to $seqres.full too, otherwise
> it fails with ext2/3 as
> 
> +mke2fs 1.42.9 (28-Dec-2013)
> 
> I can fix them at commit time if there's no other review comments.

hm, ok thanks.  Not sure how I missed that, unless newer e2fsprogs
doesn't go to stderr (I was testing with 1.43.x)

Thanks,
-Eric

> Thanks,
> Eryu
> 

  reply	other threads:[~2016-09-21 13:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-20 22:14 [PATCH 0/3] move xfs non-project quota tests to generic Eric Sandeen
2016-09-20 22:15 ` [PATCH 1/3] xfs/260: fix output to match actions Eric Sandeen
2016-09-22 14:07   ` Bill O'Donnell
2016-09-20 22:21 ` [PATCH 2/3] modify xfs/ quota tests to work on generic filesystems Eric Sandeen
2016-09-21  9:37   ` Eryu Guan
2016-09-21 13:02     ` Eric Sandeen [this message]
2016-09-21 14:30       ` Eryu Guan
2016-09-21 14:52         ` Eric Sandeen
2016-09-22 14:09   ` Bill O'Donnell
2016-09-22 18:54   ` [PATCH 2/3 V2] " Eric Sandeen
2016-09-22 18:57     ` Bill O'Donnell
2016-09-20 22:24 ` [PATCH 3/3] move now-generic quota tests to generic Eric Sandeen
2016-09-20 23:40   ` Dave Chinner
2016-09-21  1:41     ` Eric Sandeen
2016-09-21  6:44     ` Eryu Guan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a9112b04-17a3-dbdc-7c19-b2490875b6fd@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=eguan@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=sandeen@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.