public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: Eryu Guan <eguan@linux.alibaba.com>
Cc: Anand Jain <anand.jain@oracle.com>,
	linux-btrfs@vger.kernel.org, fstests@vger.kernel.org
Subject: Re: [PATCH v3] btrfs: Test proper interaction between skip_balance and paused balance
Date: Wed, 10 Nov 2021 13:18:25 +0200	[thread overview]
Message-ID: <3e58ea25-d21a-b668-4d48-40437ac0ea29@suse.com> (raw)
In-Reply-To: <20211110105311.GW60846@e18g06458.et15sqa>



On 10.11.21 г. 12:53, Eryu Guan wrote:
> On Wed, Nov 10, 2021 at 12:07:37PM +0200, Nikolay Borisov wrote:
>> <snip>
>>
>>
>>>> +# titled "btrfs: allow device add if balance is paused"
>>>
>>> It is a new feature, not a bug fix? The kernel patch won't backport to
>>> the stable kernels. Then on older kernels, this test has to exit with
>>> _notrun().
>>> Is there any way to achieve this? There isn't any sysfs interface that
>>> will help and, so far we haven't used the kernel version to achieve
>>> something like this.
>>>
>>
>> No, and this is outside the remit of xfstest. Anyone who is running
>> xfstest should ensure incompatible tests are excluded.
> 
> I don't think that's the case, we perfer test case detect required env
> to run the test and _notrun if any condition not met. For regression
> test for bug fix, we want the test to fail on old/un-patched kernel, but
> for new features we need a way to tell if the kernel in test has the
> feature or not.

There isn't really an easy way to test for the presence of this feature.
The closest I could think of is modify btrfs' exclusive_operation sysfs
to show "balance paused" and in the test simply run a dummy balance and
pause it and check whether "balance" or "balance paused" is the state of
the exclusive op. However this means for this test to also rely on the
presence of the exclusive_operation sysfs file. However, I don't like
this because adding a device to balance is independent of the
exclusive_operation sysfs i.e it only has an informative role.

> 
> Thanks,
> Eryu
> 

  reply	other threads:[~2021-11-10 11:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-08 14:29 [PATCH v3] btrfs: Test proper interaction between skip_balance and paused balance Nikolay Borisov
2021-11-10 10:03 ` Anand Jain
2021-11-10 10:07   ` Nikolay Borisov
2021-11-10 10:53     ` Eryu Guan
2021-11-10 11:18       ` Nikolay Borisov [this message]
2021-11-14 12:06 ` Eryu Guan
2021-11-15  8:11   ` Nikolay Borisov

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=3e58ea25-d21a-b668-4d48-40437ac0ea29@suse.com \
    --to=nborisov@suse.com \
    --cc=anand.jain@oracle.com \
    --cc=eguan@linux.alibaba.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox