public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: fstests@vger.kernel.org
Subject: [PATCH] fstests: fix error redirection in generic/256
Date: Sat, 12 Nov 2016 08:47:20 -0800	[thread overview]
Message-ID: <20161112164720.GA18127@infradead.org> (raw)

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>

diff --git a/tests/generic/256 b/tests/generic/256
index cfbf790..2db22cd 100755
--- a/tests/generic/256
+++ b/tests/generic/256
@@ -80,7 +80,7 @@ _fill_fs() {
 	# Creation of files or folders
 	# must not be done as root or
 	# reserved blocks will be consumed
-	_user_do "mkdir -p $dir &> /dev/null"
+	_user_do "mkdir -p $dir > /dev/null 2>&1"
 	if [ $? -ne 0 ] ; then
 		return 0
 	fi
@@ -93,7 +93,7 @@ _fill_fs() {
 	while [ $file_size -ge $block_size ]
 	do
 		bytes_written=0
-		_user_do "$XFS_IO_PROG -f -c \"pwrite 0 $file_size\" $dir/$file_count.bin &> /dev/null"
+		_user_do "$XFS_IO_PROG -f -c \"pwrite 0 $file_size\" $dir/$file_count.bin > /dev/null 2>&1"
 
 		if [ -f $dir/$file_count.bin ]
 		then

             reply	other threads:[~2016-11-12 16:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-12 16:47 Christoph Hellwig [this message]
2016-11-12 18:39 ` [PATCH] fstests: fix error redirection in generic/256 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
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=20161112164720.GA18127@infradead.org \
    --to=hch@infradead.org \
    --cc=fstests@vger.kernel.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