[PATCH] fstests: fix error redirection in generic/256

Christoph Hellwig
2016-11-12T16:47:20Z

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