* [PATCH 1/2] xfstests: generic/193 needs some help
2013-05-24 8:54 [PATCH 0/2] xfstests: a fix or two Dave Chinner
@ 2013-05-24 8:54 ` Dave Chinner
2013-05-24 8:54 ` [PATCH 2/2] xfstests: ensure all mkfs output is redirected properly Dave Chinner
1 sibling, 0 replies; 3+ messages in thread
From: Dave Chinner @ 2013-05-24 8:54 UTC (permalink / raw)
To: xfs
From: Dave Chinner <dchinner@redhat.com>
generic/192 runs the test in $here - the root of the xfstests source
tree/installation. IOWs, it doesn't test the filesystem on either
the TEST_DIR or SCRATCH_MNT, and so it not testing the filesystem
we think it is testing. Bad. Fixing this is the majority of the
change - introducing $test_root and $test_user for the files with
different owners, and then redirecting error output and filtering
the output appropriately.
And then add checks that truncate clears the suid/sgid bits
appropriately, somethign that has never been tested on XFS (and
likely other filesystems) so will cause kernels between 3.1 and 3.9
to assert fail as Dave Jones has recently reported.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
tests/generic/193 | 135 ++++++++++++++++++++++++++++++++-----------------
tests/generic/193.out | 17 ++++++-
2 files changed, 105 insertions(+), 47 deletions(-)
diff --git a/tests/generic/193 b/tests/generic/193
index cdf04c2..4fa20ff 100755
--- a/tests/generic/193
+++ b/tests/generic/193
@@ -43,9 +43,9 @@ tag="added by qa $seq"
#
_create_files()
{
- touch test.root
- touch test.${qa_user}
- chown ${qa_user}:${qa_user} test.${qa_user}
+ touch $test_root
+ touch $test_user
+ chown ${qa_user}:${qa_user} $test_user
}
#
@@ -53,8 +53,13 @@ _create_files()
#
_cleanup_files()
{
- rm -f test.${qa_user}
- rm -f test.root
+ rm -f $test_user
+ rm -f $test_root
+}
+
+_filter_files()
+{
+ sed -e "s,$test_root,test.root,g" -e "s,$test_user,test.user,g"
}
# get standard environment, filters and checks
@@ -68,6 +73,9 @@ _supported_os Linux
_require_user
_need_to_be_root
+test_root=$TEST_DIR/$seq.$$.root
+test_user=$TEST_DIR/$seq.$$.user
+
#
# make sure we have a normal umask set
#
@@ -83,17 +91,17 @@ echo
_create_files
echo "user: chown root owned file to qa_user (should fail)"
-su ${qa_user} -c "chown ${qa_user} test.root"
+su ${qa_user} -c "chown ${qa_user} $test_root" 2>&1 | _filter_files
echo "user: chown root owned file to root (should fail)"
-su ${qa_user} -c "chown root test.root"
+su ${qa_user} -c "chown root $test_root" 2>&1 | _filter_files
echo "user: chown qa_user owned file to qa_user (should succeed)"
-su ${qa_user} -c "chown ${qa_user} test.${qa_user}"
+su ${qa_user} -c "chown ${qa_user} $test_user"
# this would work without _POSIX_CHOWN_RESTRICTED
echo "user: chown qa_user owned file to root (should fail)"
-su ${qa_user} -c "chown root test.${qa_user}"
+su ${qa_user} -c "chown root $test_user" 2>&1 | _filter_files
_cleanup_files
@@ -107,19 +115,19 @@ echo
_create_files
echo "user: chgrp root owned file to root (should fail)"
-su ${qa_user} -c "chgrp root test.root"
+su ${qa_user} -c "chgrp root $test_root" 2>&1 | _filter_files
echo "user: chgrp qa_user owned file to root (should fail)"
-su ${qa_user} -c "chgrp root test.${qa_user}"
+su ${qa_user} -c "chgrp root $test_user" 2>&1 | _filter_files
echo "user: chgrp root owned file to qa_user (should fail)"
-su ${qa_user} -c "chgrp ${qa_user} test.root"
+su ${qa_user} -c "chgrp ${qa_user} $test_root" 2>&1 | _filter_files
echo "user: chgrp qa_user owned file to qa_user (should succeed)"
-su ${qa_user} -c "chgrp ${qa_user} test.${qa_user}"
+su ${qa_user} -c "chgrp ${qa_user} $test_user"
#echo "user: chgrp qa_user owned file to secondary group (should succeed)"
-#su ${qa_user} -c "chgrp ${group2} test.${qa_user}"
+#su ${qa_user} -c "chgrp ${group2} $test_user"
_cleanup_files
@@ -133,10 +141,10 @@ echo
_create_files
echo "user: chmod a+r on qa_user owned file (should succeed)"
-su ${qa_user} -c "chmod a+r test.${qa_user}"
+su ${qa_user} -c "chmod a+r $test_user"
echo "user: chmod a+r on root owned file (should fail)"
-su ${qa_user} -c "chmod a+r test.root"
+su ${qa_user} -c "chmod a+r $test_root" 2>&1 | _filter_files
#
# Setup a file owned by the qa_user, but with a group ID that
@@ -153,12 +161,12 @@ su ${qa_user} -c "chmod a+r test.root"
# reg file + file's gid not in process' group set + no approp. privileges -> clear sgid
#
echo "check that the sgid bit is cleared"
-chown ${qa_user}:root test.${qa_user}
-chmod g+s test.${qa_user}
+chown ${qa_user}:root $test_user
+chmod g+s $test_user
# and let the qa_user change permission bits
-su ${qa_user} -c "chmod a+w test.${qa_user}"
-stat -c '%A' test.${qa_user}
+su ${qa_user} -c "chmod a+w $test_user"
+stat -c '%A' $test_user
#
# Setup a file owned by the qa_user and with the suid bit set.
@@ -166,9 +174,9 @@ stat -c '%A' test.${qa_user}
# There is nothing in Posix that says it should but just checking.
#
echo "check that suid bit is not cleared"
-chmod u+s test.${qa_user}
-chmod a+w test.${qa_user}
-stat -c '%A' test.${qa_user}
+chmod u+s $test_user
+chmod a+w $test_user
+stat -c '%A' $test_user
_cleanup_files
@@ -196,35 +204,72 @@ _create_files
echo "check that suid/sgid bits are cleared after successful chown..."
echo "with no exec perm"
-chmod ug+s test.${qa_user}
-echo -n "before: "; stat -c '%A' test.${qa_user}
-chown root test.${qa_user}
-echo -n "after: "; stat -c '%A' test.${qa_user}
+chmod ug+s $test_user
+echo -n "before: "; stat -c '%A' $test_user
+chown root $test_user
+echo -n "after: "; stat -c '%A' $test_user
echo "with user exec perm"
-chmod ug+s test.${qa_user}
-chmod u+x test.${qa_user}
-echo -n "before: "; stat -c '%A' test.${qa_user}
-chown root test.${qa_user}
-echo -n "after: "; stat -c '%A' test.${qa_user}
+chmod ug+s $test_user
+chmod u+x $test_user
+echo -n "before: "; stat -c '%A' $test_user
+chown root $test_user
+echo -n "after: "; stat -c '%A' $test_user
echo "with group exec perm"
-chmod ug+s test.${qa_user}
-chmod g+x test.${qa_user}
-chmod u-x test.${qa_user}
-echo -n "before: "; stat -c '%A' test.${qa_user}
-chown root test.${qa_user}
-echo -n "after: "; stat -c '%A' test.${qa_user}
+chmod ug+s $test_user
+chmod g+x $test_user
+chmod u-x $test_user
+echo -n "before: "; stat -c '%A' $test_user
+chown root $test_user
+echo -n "after: "; stat -c '%A' $test_user
echo "with user+group exec perm"
-chmod ug+s test.${qa_user}
-chmod ug+x test.${qa_user}
-echo -n "before: "; stat -c '%A' test.${qa_user}
-chown root test.${qa_user}
-echo -n "after: "; stat -c '%A' test.${qa_user}
+chmod ug+s $test_user
+chmod ug+x $test_user
+echo -n "before: "; stat -c '%A' $test_user
+chown root $test_user
+echo -n "after: "; stat -c '%A' $test_user
_cleanup_files
+_create_files
+# Now test out the clear of suid/sgid for truncate
+#
+echo "check that suid/sgid bits are cleared after successful truncate..."
+
+echo "with no exec perm"
+echo frobnozzle >> $test_user
+chmod ug+s $test_user
+echo -n "before: "; stat -c '%A' $test_user
+su ${qa_user} -c "echo > $test_user"
+echo -n "after: "; stat -c '%A' $test_user
+
+echo "with user exec perm"
+echo frobnozzle >> $test_user
+chmod ug+s $test_user
+chmod u+x $test_user
+echo -n "before: "; stat -c '%A' $test_user
+su ${qa_user} -c "echo > $test_user"
+echo -n "after: "; stat -c '%A' $test_user
+
+echo "with group exec perm"
+echo frobnozzle >> $test_user
+chmod ug+s $test_user
+chmod g+x $test_user
+chmod u-x $test_user
+echo -n "before: "; stat -c '%A' $test_user
+su ${qa_user} -c "echo > $test_user"
+echo -n "after: "; stat -c '%A' $test_user
+
+echo "with user+group exec perm"
+echo frobnozzle >> $test_user
+chmod ug+s $test_user
+chmod ug+x $test_user
+echo -n "before: "; stat -c '%A' $test_user
+su ${qa_user} -c "echo > $test_user"
+echo -n "after: "; stat -c '%A' $test_user
+
#
# Test ATTR_*TIMES_SET
#
@@ -235,10 +280,10 @@ echo
_create_files
echo "user: touch qa_user file (should succeed)"
-su ${qa_user} -c "touch test.${qa_user}"
+su ${qa_user} -c "touch $test_user"
echo "user: touch root file (should fail)"
-su ${qa_user} -c "touch test.root"
+su ${qa_user} -c "touch $test_root" 2>&1 | _filter_files
_cleanup_files
diff --git a/tests/generic/193.out b/tests/generic/193.out
index b89add3..357a7c1 100644
--- a/tests/generic/193.out
+++ b/tests/generic/193.out
@@ -8,14 +8,14 @@ user: chown root owned file to root (should fail)
chown: changing ownership of `test.root': Operation not permitted
user: chown qa_user owned file to qa_user (should succeed)
user: chown qa_user owned file to root (should fail)
-chown: changing ownership of `test.fsgqa': Operation not permitted
+chown: changing ownership of `test.user': Operation not permitted
testing ATTR_GID
user: chgrp root owned file to root (should fail)
chgrp: changing group of `test.root': Operation not permitted
user: chgrp qa_user owned file to root (should fail)
-chgrp: changing group of `test.fsgqa': Operation not permitted
+chgrp: changing group of `test.user': Operation not permitted
user: chgrp root owned file to qa_user (should fail)
chgrp: changing group of `test.root': Operation not permitted
user: chgrp qa_user owned file to qa_user (should succeed)
@@ -42,6 +42,19 @@ after: -rw-r-xr--
with user+group exec perm
before: -rwsr-sr--
after: -rwxr-xr--
+check that suid/sgid bits are cleared after successful truncate...
+with no exec perm
+before: -rwSr-Sr--
+after: -rw-r-Sr--
+with user exec perm
+before: -rwsr-Sr--
+after: -rwxr-Sr--
+with group exec perm
+before: -rwSr-sr--
+after: -rw-r-xr--
+with user+group exec perm
+before: -rwsr-sr--
+after: -rwxr-xr--
testing ATTR_*TIMES_SET
--
1.7.10.4
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 2/2] xfstests: ensure all mkfs output is redirected properly
2013-05-24 8:54 [PATCH 0/2] xfstests: a fix or two Dave Chinner
2013-05-24 8:54 ` [PATCH 1/2] xfstests: generic/193 needs some help Dave Chinner
@ 2013-05-24 8:54 ` Dave Chinner
1 sibling, 0 replies; 3+ messages in thread
From: Dave Chinner @ 2013-05-24 8:54 UTC (permalink / raw)
To: xfs
From: Dave Chinner <dchinner@redhat.com>
mkfs.xfs with experimental CRC support outputs extra warnings about
being experimental on stderr, and so some tests do not redirect the
output correctly. These tests fail with a golden output mismatch due
to this. Fix these tests by redirecting stderr to either seqres.full
or /dev/null.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
---
common/dump | 4 ++--
common/rc | 2 +-
common/repair | 2 ++
tests/xfs/004 | 3 ++-
tests/xfs/021 | 2 +-
tests/xfs/029 | 2 +-
tests/xfs/030 | 2 +-
tests/xfs/031 | 2 ++
tests/xfs/033 | 4 ++--
tests/xfs/041 | 5 +++--
tests/xfs/042 | 2 +-
tests/xfs/050 | 2 +-
tests/xfs/052 | 2 +-
tests/xfs/067 | 4 ++--
tests/xfs/071 | 2 +-
tests/xfs/072 | 3 +--
tests/xfs/073 | 5 +++--
tests/xfs/104 | 2 +-
tests/xfs/106 | 2 +-
tests/xfs/107 | 2 +-
tests/xfs/108 | 2 +-
tests/xfs/109 | 3 ++-
tests/xfs/110 | 2 +-
tests/xfs/118 | 2 +-
tests/xfs/178 | 2 +-
tests/xfs/189 | 2 +-
tests/xfs/244 | 6 ++++--
tests/xfs/287 | 4 ++--
28 files changed, 43 insertions(+), 34 deletions(-)
diff --git a/common/dump b/common/dump
index 7fe50f6..9c998e5 100644
--- a/common/dump
+++ b/common/dump
@@ -236,8 +236,8 @@ _wipe_fs()
{
_require_scratch
- _scratch_mkfs_xfs >>$seqres.full || _fail "mkfs failed"
- _scratch_mount >>$seqres.full || _fail "mount failed"
+ _scratch_mkfs_xfs >>$seqres.full 2>&1 || _fail "mkfs failed"
+ _scratch_mount >>$seqres.full 2>&1 || _fail "mount failed"
}
#
diff --git a/common/rc b/common/rc
index fe6bbfc..88d38ef 100644
--- a/common/rc
+++ b/common/rc
@@ -1078,7 +1078,7 @@ _require_dm_flakey()
#
_require_projid32bit()
{
- _scratch_mkfs_xfs -f -i projid32bit=0 2>&1 >/dev/null \
+ _scratch_mkfs_xfs -f -i projid32bit=0 >/dev/null 2>&1 \
|| _notrun "mkfs.xfs doesn't have projid32bit feature"
}
diff --git a/common/repair b/common/repair
index db160bb..243f70f 100644
--- a/common/repair
+++ b/common/repair
@@ -80,6 +80,8 @@ s/\s+- \d+:\d\d:\d\d:.*\n//g;
# crc enabled filesystem output
/XFS_CORRUPTION_ERROR/ && next;
/^bad uuid/ && next;
+/^Version 5 superblock detected./ && next;
+/^Use of these features/ && next;
print;'
}
diff --git a/tests/xfs/004 b/tests/xfs/004
index 978943d..3cb7a08 100755
--- a/tests/xfs/004
+++ b/tests/xfs/004
@@ -41,7 +41,8 @@ trap "_cleanup" 0 1 2 3 15
_populate_scratch()
{
echo "=== mkfs output ===" >>$seqres.full
- _scratch_mkfs_xfs | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs
+ _scratch_mkfs_xfs 2> /dev/null | tee -a $seqres.full \
+ | _filter_mkfs 2>$tmp.mkfs
. $tmp.mkfs
_scratch_mount
dd if=/dev/zero of=$SCRATCH_MNT/foo count=200 bs=4096 >/dev/null 2>&1 &
diff --git a/tests/xfs/021 b/tests/xfs/021
index a727b51..46a3f1b 100755
--- a/tests/xfs/021
+++ b/tests/xfs/021
@@ -83,7 +83,7 @@ rm -f $seqres.full
umount $SCRATCH_DEV >/dev/null 2>&1
echo "*** mkfs"
-_scratch_mkfs_xfs >/dev/null \
+_scratch_mkfs_xfs >/dev/null 2>&1 \
|| _fail "mkfs failed"
echo "*** mount FS"
diff --git a/tests/xfs/029 b/tests/xfs/029
index 0709fce..ffe6e5a 100755
--- a/tests/xfs/029
+++ b/tests/xfs/029
@@ -58,7 +58,7 @@ _supported_os Linux
_require_scratch
echo
-_scratch_mkfs_xfs | _filter_mkfs 2>/dev/null
+_scratch_mkfs_xfs > /dev/null 2>&1
echo
_scratch_xfs_logprint | _filter_logprint
diff --git a/tests/xfs/030 b/tests/xfs/030
index af03166..c89ffe1 100755
--- a/tests/xfs/030
+++ b/tests/xfs/030
@@ -98,7 +98,7 @@ src/devzero -v -1 -n "$clear" $SCRATCH_DEV >/dev/null
# now kick off the real repair test...
#
-_scratch_mkfs_xfs $DSIZE | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs $DSIZE 2>/dev/null | _filter_mkfs 2>$tmp.mkfs
. $tmp.mkfs
_check_ag 0
_check_ag -1
diff --git a/tests/xfs/031 b/tests/xfs/031
index 48a97e1..3fbc7de 100755
--- a/tests/xfs/031
+++ b/tests/xfs/031
@@ -56,6 +56,8 @@ _check_repair()
fi
# echo all interesting stuff...
perl -ne '
+ /EXPERIMENTAL/d;
+ /Use of these features/d;
s/(rebuilding directory inode) (\d+)/\1 INO/g;
s/internal log/<TYPEOF> log/g;
s/external log on \S+/<TYPEOF> log/g;
diff --git a/tests/xfs/033 b/tests/xfs/033
index bf906e0..bfdffce 100755
--- a/tests/xfs/033
+++ b/tests/xfs/033
@@ -81,10 +81,10 @@ _require_scratch
_require_no_large_scratch_dev
# devzero blows away 512byte blocks, so make 512byte inodes (at least)
-_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs 2> /dev/null | _filter_mkfs 2>$tmp.mkfs
. $tmp.mkfs
[ $isize -lt 512 ] && \
- _scratch_mkfs_xfs -isize=512 | _filter_mkfs >/dev/null 2>&1
+ _scratch_mkfs_xfs -isize=512 2> /dev/null | _filter_mkfs >/dev/null 2>&1
`xfs_db -r -c sb -c p $SCRATCH_DEV | grep 'ino = ' | \
sed -e 's/ //g' -e 's/^/export /'`
diff --git a/tests/xfs/041 b/tests/xfs/041
index 8b109fc..f25975a 100755
--- a/tests/xfs/041
+++ b/tests/xfs/041
@@ -63,8 +63,9 @@ _do_die_on_error=message_only
rm -f $seqres.full
agsize=32
echo -n "Make $agsize megabyte filesystem on SCRATCH_DEV and mount... "
-_scratch_mkfs_xfs -dsize=${agsize}m,agcount=1 2>&1 >/dev/null || _fail "mkfs failed"
-bsize=`_scratch_mkfs_xfs -dsize=${agsize}m,agcount=1 2>&1 | _filter_mkfs 2>&1 \
+_scratch_mkfs_xfs -dsize=${agsize}m,agcount=1 >/dev/null 2>&1 || _fail "mkfs failed"
+bsize=`_scratch_mkfs_xfs -dsize=${agsize}m,agcount=1 2> /dev/null \
+ |_filter_mkfs 2>&1 \
| perl -ne 'if (/dbsize=(\d+)/) {print $1;}'`
onemeginblocks=`expr 1048576 / $bsize`
_scratch_mount || _fail "mount failed"
diff --git a/tests/xfs/042 b/tests/xfs/042
index db0fa28..bb9ab03 100755
--- a/tests/xfs/042
+++ b/tests/xfs/042
@@ -91,7 +91,7 @@ rm -f $seqres.full
_do_die_on_error=message_only
echo -n "Make a 48 megabyte filesystem on SCRATCH_DEV and mount... "
-_scratch_mkfs_xfs -dsize=48m,agcount=3 2>&1 >/dev/null || _fail "mkfs failed"
+_scratch_mkfs_xfs -dsize=48m,agcount=3 >/dev/null 2>&1 || _fail "mkfs failed"
_scratch_mount || _fail "mount failed"
echo "done"
diff --git a/tests/xfs/050 b/tests/xfs/050
index 6641e7d..ab85107 100755
--- a/tests/xfs/050
+++ b/tests/xfs/050
@@ -116,7 +116,7 @@ _qsetup()
_exercise()
{
- _scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+ _scratch_mkfs_xfs 2> /dev/null | _filter_mkfs 2>$tmp.mkfs
cat $tmp.mkfs >>$seqres.full
# keep the blocksize and data size for dd later
diff --git a/tests/xfs/052 b/tests/xfs/052
index c2cf596..0d3d6b7 100755
--- a/tests/xfs/052
+++ b/tests/xfs/052
@@ -59,7 +59,7 @@ _require_nobody
# setup a default run
_qmount_option uquota
-_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs 2> /dev/null | _filter_mkfs 2>$tmp.mkfs
cat $tmp.mkfs >>$seqres.full
chmod a+w $seqres.full # arbitrary users will write here
diff --git a/tests/xfs/067 b/tests/xfs/067
index 27f5713..fd664b6 100755
--- a/tests/xfs/067
+++ b/tests/xfs/067
@@ -47,10 +47,10 @@ _require_scratch
# set up fs for 1K inodes
isize=0
-_scratch_mkfs_xfs | _filter_mkfs >$seqres.full 2>$tmp.mkfs
+_scratch_mkfs_xfs 2>&1 | _filter_mkfs >$seqres.full 2>$tmp.mkfs
[ $? -eq 0 ] && source $tmp.mkfs
if [ "$isize" -lt 1024 ]; then
- _scratch_mkfs_xfs -i size=1024 >>$seqres.full \
+ _scratch_mkfs_xfs -i size=1024 >>$seqres.full 2>&1 \
|| _notrun "Cannot mkfs for this test using MKFS_OPTIONS specified"
fi
_scratch_mount >>$seqres.full || _fail "mount failed"
diff --git a/tests/xfs/071 b/tests/xfs/071
index 86c6899..52c56ac 100755
--- a/tests/xfs/071
+++ b/tests/xfs/071
@@ -105,7 +105,7 @@ _supported_os IRIX Linux
[ -n "$XFS_IO_PROG" ] || _notrun "xfs_io executable not found"
_require_scratch
-_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs 2> /dev/null | _filter_mkfs 2>$tmp.mkfs
. $tmp.mkfs
echo
_scratch_mount
diff --git a/tests/xfs/072 b/tests/xfs/072
index 9949749..e71bb08 100755
--- a/tests/xfs/072
+++ b/tests/xfs/072
@@ -51,9 +51,8 @@ _supported_os IRIX Linux
_require_scratch
rm -f $seqres.full
-umount $SCRATCH_DEV >/dev/null 2>&1
-_scratch_mkfs_xfs >/dev/null || _fail "mkfs failed"
+_scratch_mkfs_xfs >/dev/null 2>&1 || _fail "mkfs failed"
_scratch_mount >/dev/null || _fail "mount failed"
# check there's enough freespace on $SCRATCH_MNT ... (1GiB + 1MiB)
diff --git a/tests/xfs/073 b/tests/xfs/073
index ad38059..b3204f8 100755
--- a/tests/xfs/073
+++ b/tests/xfs/073
@@ -133,7 +133,7 @@ _supported_os Linux
_require_scratch
_require_loop
-_scratch_mkfs_xfs -dsize=41m,agcount=2 | _filter_mkfs 2>/dev/null
+_scratch_mkfs_xfs -dsize=41m,agcount=2 2> /dev/null | _filter_mkfs 2>/dev/null
_scratch_mount 2>/dev/null || _fail "initial scratch mount failed"
echo
@@ -153,7 +153,8 @@ _verify_copy $imgs.image $SCRATCH_DEV $SCRATCH_MNT
echo
echo === copying scratch device to single target, large ro device
-${MKFS_PROG}.xfs -dfile,name=$imgs.source,size=100g | _filter_mkfs 2>/dev/null
+${MKFS_PROG}.xfs -dfile,name=$imgs.source,size=100g 2> /dev/null \
+ | _filter_mkfs 2>/dev/null
rmdir $imgs.source_dir 2>/dev/null
mkdir $imgs.source_dir
diff --git a/tests/xfs/104 b/tests/xfs/104
index d31cf16..5938f54 100755
--- a/tests/xfs/104
+++ b/tests/xfs/104
@@ -71,7 +71,7 @@ _stress_scratch()
# real QA test starts here
_supported_fs xfs
_require_scratch
-_scratch_mkfs_xfs | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs 2> /dev/null | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs
. $tmp.mkfs # extract blocksize and data size for scratch device
endsize=`expr 550 \* 1048576` # stop after growing this big
diff --git a/tests/xfs/106 b/tests/xfs/106
index 7f97722..3fb914a 100755
--- a/tests/xfs/106
+++ b/tests/xfs/106
@@ -44,7 +44,7 @@ _require_scratch
_require_xfs_quota
# real QA test starts here
-_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs 2> /dev/null | _filter_mkfs 2>$tmp.mkfs
cat $tmp.mkfs >$seqres.full
. $tmp.mkfs
diff --git a/tests/xfs/107 b/tests/xfs/107
index 2bd20a3..72c2642 100755
--- a/tests/xfs/107
+++ b/tests/xfs/107
@@ -56,7 +56,7 @@ _require_scratch
_require_xfs_quota
# real QA test starts here
-_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs 2> /dev/null | _filter_mkfs 2>$tmp.mkfs
cat $tmp.mkfs >$seqres.full
. $tmp.mkfs
diff --git a/tests/xfs/108 b/tests/xfs/108
index 5a47009..0d41988 100755
--- a/tests/xfs/108
+++ b/tests/xfs/108
@@ -83,7 +83,7 @@ _require_prjquota $SCRATCH_DEV
# real QA test starts here
rm -f $tmp.projects $seqres.full
umount $SCRATCH_DEV 2>/dev/null
-_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs 2> /dev/null | _filter_mkfs 2>$tmp.mkfs
cat $tmp.mkfs >>$seqres.full
_scratch_mount
diff --git a/tests/xfs/109 b/tests/xfs/109
index 5578c90..e7a6d15 100755
--- a/tests/xfs/109
+++ b/tests/xfs/109
@@ -102,7 +102,8 @@ if [ -n "$FASTSTART" -a -f $SCRATCH_MNT/f0 ]; then
fi
umount $SCRATCH_DEV
-_scratch_mkfs_xfs -dsize=160m,agcount=4 $faststart | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs -dsize=160m,agcount=4 $faststart 2> /dev/null \
+ | _filter_mkfs 2>$tmp.mkfs
cat $tmp.mkfs >>$seqres.full
_scratch_mount
diff --git a/tests/xfs/110 b/tests/xfs/110
index 48bea45..46fe2f7 100755
--- a/tests/xfs/110
+++ b/tests/xfs/110
@@ -42,7 +42,7 @@ _require_scratch
# real QA test starts here
umount $SCRATCH_DEV 2>/dev/null
-_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs 2> /dev/null | _filter_mkfs 2>$tmp.mkfs
STR1=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
STR2=BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
diff --git a/tests/xfs/118 b/tests/xfs/118
index 8414594..a0c1a54 100755
--- a/tests/xfs/118
+++ b/tests/xfs/118
@@ -72,7 +72,7 @@ _chowning_file()
}
echo "mkfs on scratch"
-_scratch_mkfs_xfs >$seqres.full
+_scratch_mkfs_xfs >$seqres.full 2> /dev/null
echo "mount with quotas"
export MOUNT_OPTIONS="-o uquota"
diff --git a/tests/xfs/178 b/tests/xfs/178
index 9db8d05..4efba35 100755
--- a/tests/xfs/178
+++ b/tests/xfs/178
@@ -74,7 +74,7 @@ _supported_os Linux
# fix filesystem, new mkfs.xfs will be fine.
_require_scratch
-_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs \
+_scratch_mkfs_xfs 2> /dev/null | _filter_mkfs 2>$tmp.mkfs \
|| _fail "mkfs failed!"
# By executing the followint tmp file, will get on the mkfs options stored in
diff --git a/tests/xfs/189 b/tests/xfs/189
index 27bfb63..9f6921a 100755
--- a/tests/xfs/189
+++ b/tests/xfs/189
@@ -241,7 +241,7 @@ _require_scratch
unset SCRATCH_RTDEV
unset SCRATCH_LOGDEV
-_scratch_mkfs_xfs | _filter_mkfs 2>/dev/null
+_scratch_mkfs_xfs 2> /dev/null | _filter_mkfs 2>/dev/null
_add_scratch_fstab
_test_remount_rw
diff --git a/tests/xfs/244 b/tests/xfs/244
index d899a3d..7d2a2d3 100755
--- a/tests/xfs/244
+++ b/tests/xfs/244
@@ -52,7 +52,8 @@ _require_projid32bit
export MOUNT_OPTIONS="-opquota"
# make fs with no projid32bit
-_scratch_mkfs_xfs -i projid32bit=0 >> $seqres.full || _fail "mkfs failed"
+_scratch_mkfs_xfs -i projid32bit=0 2> /dev/null >> $seqres.full \
+ || _fail "mkfs failed"
_qmount
# make sure project quota is supported
_require_prjquota ${SCRATCH_DEV}
@@ -96,7 +97,8 @@ fi
# Do testing on filesystem with projid32bit feature enabled
umount $SCRATCH_DEV 2>/dev/null
-_scratch_mkfs_xfs -i projid32bit=1 >> $seqres.full || _fail "mkfs failed"
+_scratch_mkfs_xfs -i projid32bit=1 >> $seqres.full 2> /dev/null \
+ || _fail "mkfs failed"
_qmount
mkdir $dir
diff --git a/tests/xfs/287 b/tests/xfs/287
index 10853d1..9de0b3d 100755
--- a/tests/xfs/287
+++ b/tests/xfs/287
@@ -58,8 +58,8 @@ _require_scratch
_require_projid32bit
# create xfs fs without projid32bit ability, will be gained by xfs_admin
-_scratch_mkfs_xfs -i projid32bit=0 -d size=200m >> $seqres.full \
- || _fail "mkfs failed"
+_scratch_mkfs_xfs -i projid32bit=0 -d size=200m 2> /dev/null >> $seqres.full \
+ || _fail "mkfs failed"
_qmount_option "pquota"
_qmount
# require project quotas
--
1.7.10.4
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 3+ messages in thread