xfs
[Top] [All Lists]

Re: [PATCH] Add test 257: Check proper FITRIM argument handling

To: Lukas Czerner <lczerner@xxxxxxxxxx>
Subject: Re: [PATCH] Add test 257: Check proper FITRIM argument handling
From: Alex Elder <aelder@xxxxxxx>
Date: Mon, 26 Sep 2011 10:47:27 -0500
Cc: <xfs@xxxxxxxxxxx>
In-reply-to: <alpine.LFD.2.00.1109261541500.3806@xxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <1316787311-23428-2-git-send-email-lczerner@xxxxxxxxxx> <1317021244-7556-1-git-send-email-lczerner@xxxxxxxxxx> <1317041252.3030.24.camel@doink> <alpine.LFD.2.00.1109261541500.3806@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Reply-to: <aelder@xxxxxxx>
On Mon, 2011-09-26 at 15:52 +0200, Lukas Czerner wrote:
> On Mon, 26 Sep 2011, Alex Elder wrote:
> 
> > On Mon, 2011-09-26 at 09:14 +0200, Lukas Czerner wrote:
. . .
> > I think the use of "bc" to do certain math operations
> > has some value, and as such I think the right fix is
> > just to require "bc" in order for xfstests, or at least
> > for any that use the _math() function, and drop the
> > fall-back logic out of the definition of _math().
> > 
> > What do you think?
> 
> Yes I had the same concern, but I guess I was just lazy to look at it
> :). So if we can require "bc" for xfstests we can simply remove the
> fallback. Also maybe adding helper _require_bc, or maybe even better
> adding helper _require <whatever> so we can check for <whatever> tool
> in any test.

Would you mind re-submitting the first patch (which defined
the _math() function), adding the definition of _require_math
which would be used in any script that uses the _math function?
That would fail if "bc" weren't available.  It seems indirect
but I think _require_math makes more sense in the context of
whoever would be using it than _require_bc would.

And having heard nobody voice objection to the idea I think
we should just go with it.

I can take your other patch and insert the _require_math call
for you, and will verify the result works before committing it.

Thanks.

                                        -Alex

<Prev in Thread] Current Thread [Next in Thread>