public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Boris Ranto <branto@redhat.com>
Cc: xfs <xfs@oss.sgi.com>
Subject: Re: xfstests: print the message that fallocate is not supported to stdout unless quiet output
Date: Wed, 11 May 2011 11:55:33 -0500	[thread overview]
Message-ID: <4DCABF85.4080705@sandeen.net> (raw)
In-Reply-To: <1305126445.22267.37.camel@dhcp-31-190.brq.redhat.com>

On 5/11/11 10:07 AM, Boris Ranto wrote:
> ltp/fsx.c tests whether the filesystem it is run on supports fallocate. If it is not supported the fsx will print warning to stderr.
> This leads to fails of tests 075, 112, 127 for the filesystems that do not support fallocate. The tests use ltp/fsx but do not filter out stderr.
> Since ltp/fsx.c can work without fallocate support I propose to move this message to stdout unless quiet output is not requested.
> Previous patch printed the message even if -q flag was used. This patch honours the flag.
> 
> This simple patch fixes the issue for me, tested on all the mentioned tests:
> 
> Signed-off-by: Boris Ranto <branto@redhat.com>

Good idea, sorry about that!

I'll commit this with my signoff.

-Eric

> diff --git a/ltp/fsx.c b/ltp/fsx.c
> index fe072d3..43e7efe 100644
> --- a/ltp/fsx.c
> +++ b/ltp/fsx.c
> @@ -1424,7 +1424,8 @@ main(int argc, char **argv)
>  #ifdef FALLOCATE
>         if (!lite && fallocate_calls) {
>                 if (fallocate(fd, 0, 0, 1) && errno == EOPNOTSUPP) {
> -                       warn("main: filesystem does not support fallocate, disabling");
> +                       if(!quiet)
> +                               prt("fsx: main: filesystem does not support fallocate, disabling\n");
>                         fallocate_calls = 0;
>                 } else
>                         ftruncate(fd, 0);
> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
> 

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      reply	other threads:[~2011-05-11 16:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-11 15:07 xfstests: print the message that fallocate is not supported to stdout unless quiet output Boris Ranto
2011-05-11 16:55 ` Eric Sandeen [this message]

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=4DCABF85.4080705@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=branto@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