[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b809f785-fc8b-4fa5-5de2-26dc9a4aed94@deltatee.com>
Date: Tue, 6 Oct 2020 17:51:18 -0600
From: Logan Gunthorpe <logang@...tatee.com>
To: Chaitanya Kulkarni <Chaitanya.Kulkarni@....com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-nvme@...ts.infradead.org" <linux-nvme@...ts.infradead.org>,
"linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
Omar Sandoval <osandov@...ndov.com>
Cc: Sagi Grimberg <sagi@...mberg.me>,
Stephen Bates <sbates@...thlin.com>
Subject: Re: [PATCH blktests v2 02/11] common/xfs: Create common helper to
check for XFS support
On 2020-10-06 5:44 p.m., Chaitanya Kulkarni wrote:
> On 9/30/20 11:54, Logan Gunthorpe wrote:
>>
>> requires() {
>> _nvme_requires
>> - _have_program mkfs.xfs && _have_fio
>> + _have_xfs
>> + _have_fio
> Can you make _have_xfs return true false ? so it can be used with && ?
_have_xfs() does return true/false and can be used with && or in a
conditional.
Per [1], my opinion is that using && in the requires() function where
the return value is ignored is confusing so I prefer not to do it in new
code.
If we want to reconsider this we, should add a check to ensure the
return value of requires() matches the expectation of the global
variable it uses.
Logan
[1]
https://lore.kernel.org/linux-block/92478e6f-622a-a1ae-6189-4009f9a307bc@deltatee.com/
Powered by blists - more mailing lists