From: Alex Elder <aelder@sgi.com>
To: Lukas Czerner <lczerner@redhat.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] Add test 257: Check proper FITRIM argument handling
Date: Mon, 26 Sep 2011 07:47:32 -0500 [thread overview]
Message-ID: <1317041252.3030.24.camel@doink> (raw)
In-Reply-To: <1317021244-7556-1-git-send-email-lczerner@redhat.com>
On Mon, 2011-09-26 at 09:14 +0200, Lukas Czerner wrote:
> This test suppose to validate that file systems are using the fitrim
> arguments right. It checks that the fstrim returns EINVAl in case that
> the start of the range is beyond the end of the file system, and also
> that the fstrim works without an error if the length of the range is
> bigger than the file system (it should be truncated to the file system
> length automatically within the fitrim implementation).
>
> This test should also catch common problem with overflow of start+len.
> Some file systems (ext4,xfs) had overflow problems in the past so there
> is a specific test for it (for ext4 and xfs) as well as generic test for
> other file systems, but it would be nice if other fs can add their
> specific checks if this problem does apply to them as well.
>
> Signed-off-by: Lukas Czerner <lczerner@redhat.com>
OK, I know I suggested it, and I do like the result, but
there could be a problem with the use of things like
"2^32 - 1" being passed to the _math() function.
The problem lies in the way _math() backs off to try
to use shell built-in arithmetic, which interprets the
'^' as a bitwise XOR operator. (Note, _math() was
defined in an earlier patch.)
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?
Assuming we resolve that, this test now looks fine to me.
Reviewed-by: Alex Elder <aelder@sgi.com>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2011-09-26 12:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-23 14:15 [PATCH 1/2 v3] commit.rc: Add helper for math operation using bc Lukas Czerner
2011-09-23 14:15 ` [PATCH 2/2] Add test 257: Check proper FITRIM argument handling Lukas Czerner
2011-09-23 15:00 ` Alex Elder
2011-09-23 16:06 ` Lukas Czerner
2011-09-23 23:04 ` Michael Monnerie
2011-09-26 6:15 ` Lukas Czerner
2011-09-26 7:14 ` [PATCH] " Lukas Czerner
2011-09-26 11:42 ` Lukas Czerner
2011-09-26 12:47 ` Alex Elder [this message]
2011-09-26 13:52 ` Lukas Czerner
2011-09-26 15:47 ` Alex Elder
2011-09-23 15:00 ` [PATCH 1/2 v3] commit.rc: Add helper for math operation using bc Alex Elder
2011-09-26 18:45 ` [PATCH v4] " Lukas Czerner
2011-09-26 21:32 ` Alex Elder
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=1317041252.3030.24.camel@doink \
--to=aelder@sgi.com \
--cc=lczerner@redhat.com \
--cc=xfs@oss.sgi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox