public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Eryu Guan <eguan@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] fstests: fix error redirection in generic/256
Date: Tue, 10 Jan 2017 11:57:32 +0800	[thread overview]
Message-ID: <20170110035732.GI1859@eguan.usersys.redhat.com> (raw)
In-Reply-To: <20170110034605.GH1859@eguan.usersys.redhat.com>

On Tue, Jan 10, 2017 at 11:46:05AM +0800, Eryu Guan wrote:
> On Mon, Jan 09, 2017 at 05:40:08AM -0800, Christoph Hellwig wrote:
> > On Sun, Nov 13, 2016 at 02:39:43AM +0800, Eryu Guan wrote:
> > > On Sat, Nov 12, 2016 at 08:47:20AM -0800, Christoph Hellwig wrote:
> > > > Not sure if my shell is the problem here, but I need this explicit
> > > > redirection to ignore the error output from mkdir and xfs_io, otherwise
> > > > the test fails due to the error messages from these commands.
> > > 
> > > That's weird, from bash manpage, "&>" should be equivalent to "> ... 2>&1"
> > > 
> > > There're many other tests use "&>" as well, do you see such failures
> > > from other tests, such as generic/347?
> > 
> > No.  But 256 keeps on failing for me without this.  Given that it's
> > just a slightly more verbose syntax is there any reason not to just
> > apply this patch for now?
> 
> Ok, I've queued it up for next update.

I need to do some tweaks on this patch, generic/256 has been updated and
patch didn't apply cleanly. I replaced all "&>" with "> ... 2>&1",
though some of them won't generate any output.

Thanks,
Eryu

From: Christoph Hellwig <hch@lst.de>
Date: Sat, 12 Nov 2016 08:47:20 -0800
Subject: [PATCH] generic/256: fix error redirection

Not sure if my shell is the problem here, but I need this explicit
redirection to ignore the error output from mkdir and xfs_io,
otherwise the test fails due to the error messages from these
commands.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 tests/generic/256 | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/generic/256 b/tests/generic/256
index 63f2d4f..5327c33 100755
--- a/tests/generic/256
+++ b/tests/generic/256
@@ -81,10 +81,10 @@ _test_full_fs_punch()
                exit 1
        fi
 
-       rm -f $file_name &> /dev/null
+       rm -f $file_name > /dev/null 2>&1
 
        $XFS_IO_PROG -f -c "pwrite 0 $file_len" \
-               -c "fsync" $file_name &> /dev/null
+               -c "fsync" $file_name > /dev/null 2>&1
        chmod 666 $file_name
 
        # All files are created as a non root user to prevent reserved blocks
@@ -111,8 +111,8 @@ _test_full_fs_punch()
 }
 
 # Make a small file system to fill
-_scratch_unmount &> /dev/null
-_scratch_mkfs_sized $(( 1536 * 1024 * 1024 )) &> /dev/null
+_scratch_unmount > /dev/null 2>&1
+_scratch_mkfs_sized $(( 1536 * 1024 * 1024 )) > /dev/null 2>&1
 _scratch_mount
 # Test must be able to write files with non-root permissions
 chmod 777 $SCRATCH_MNT

  reply	other threads:[~2017-01-10  3:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-12 16:47 [PATCH] fstests: fix error redirection in generic/256 Christoph Hellwig
2016-11-12 18:39 ` Eryu Guan
2016-11-13 12:11   ` Christoph Hellwig
2017-01-09 13:40   ` Christoph Hellwig
2017-01-10  3:46     ` Eryu Guan
2017-01-10  3:57       ` Eryu Guan [this message]
2017-01-10  4:27     ` Eryu Guan
2017-01-10  6:28       ` Christoph Hellwig

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=20170110035732.GI1859@eguan.usersys.redhat.com \
    --to=eguan@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=hch@infradead.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