xfstests: stop special casing nfs and udf

For historical reasons beyond my knowledge xfstests tries to abuse the
scratch device as test device for nfs and udf.  Because not all test
have inherited the right usage of the _setup_testdir and _cleanup_testdir
helpers this leads to lots of unessecary test failures.

Remove the special casing, which gets nfs down to a minimal number of
failures.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Sugned-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
Christoph Hellwig
2013-12-03 10:29:26 +11:00
committed by Dave Chinner
parent 10298d30e5
commit c041421687
85 changed files with 137 additions and 563 deletions
+4 -6
View File
@@ -118,14 +118,14 @@ udf_fsize=20240 # number of sectors for UDF
_setup()
{
if mkdir -p $testdir/$$
if mkdir -p $TEST_DIR/$$
then
:
else
echo "Error: cannot mkdir \"$testdir/$$\""
echo "Error: cannot mkdir \"$TEST_DIR/$$\""
exit 1
fi
cd $testdir/$$
cd $TEST_DIR/$$
$verbose && echo -n "setup "
sed -e '/^#/d' $tmp.config \
@@ -286,8 +286,7 @@ _cleanup()
then
$verbose && echo "cleanup"
cd /
rm -rf $testdir/$$
_cleanup_testdir
rm -rf $TEST_DIR/$$
done_cleanup=true
fi
}
@@ -298,7 +297,6 @@ _cleanup
status=1
done_cleanup=false
_setup_testdir
_setup
# do the test
+8 -11
View File
@@ -38,43 +38,40 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup()
{
rm -f $tmp.*
_cleanup_testdir
}
# real QA test starts here
_supported_fs generic
_supported_os IRIX Linux
_setup_testdir
echo "Silence is goodness ..."
# ensure target directory exists
mkdir `dirname $testdir/$tmp` 2>/dev/null
mkdir `dirname $TEST_DIR/$tmp` 2>/dev/null
touch $testdir/$tmp.1
touch $TEST_DIR/$tmp.1
for l in 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
do
ln $testdir/$tmp.1 $testdir/$tmp.$l
x=`src/lstat64 $testdir/$tmp.1 | sed -n -e '/ Links: /s/.*Links: *//p'`
ln $TEST_DIR/$tmp.1 $TEST_DIR/$tmp.$l
x=`src/lstat64 $TEST_DIR/$tmp.1 | sed -n -e '/ Links: /s/.*Links: *//p'`
if [ "$l" -ne $x ]
then
echo "Arrgh, created link #$l and lstat64 looks like ..."
src/lstat64 $testdir/$tmp.1
src/lstat64 $TEST_DIR/$tmp.1
status=1
fi
done
for l in 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
do
x=`src/lstat64 $testdir/$tmp.1 | sed -n -e '/ Links: /s/.*Links: *//p'`
x=`src/lstat64 $TEST_DIR/$tmp.1 | sed -n -e '/ Links: /s/.*Links: *//p'`
if [ "$l" -ne $x ]
then
echo "Arrgh, about to remove link #$l and lstat64 looks like ..."
src/lstat64 $testdir/$tmp.1
src/lstat64 $TEST_DIR/$tmp.1
status=1
fi
rm -f $testdir/$tmp.$l
rm -f $TEST_DIR/$tmp.$l
done
# success, all done
+2 -5
View File
@@ -43,10 +43,9 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup()
{
cd $testdir
cd $TEST_DIR
rm -f symlink_{0,1,2,3,4}{0,1,2,3,4,5,6,7,8,9} symlink_self empty_file
cd /
_cleanup_testdir
}
_touch()
@@ -75,9 +74,7 @@ else
_supported_os Linux IRIX
fi
_setup_testdir
cd $testdir
cd $TEST_DIR
o=empty_file
touch $o
+6 -9
View File
@@ -35,8 +35,7 @@ _cleanup()
{
cd /
rm -f $tmp.*
rm -rf $testdir/permname.$$
_cleanup_testdir
rm -rf $TEST_DIR/permname.$$
}
_count()
@@ -56,23 +55,21 @@ _count()
_supported_fs generic
_supported_os IRIX Linux
_setup_testdir
mkdir $testdir/permname.$$
mkdir $TEST_DIR/permname.$$
echo ""
echo "single thread permname"
echo "----------------------"
mkdir $testdir/permname.$$/a
cd $testdir/permname.$$/a
mkdir $TEST_DIR/permname.$$/a
cd $TEST_DIR/permname.$$/a
$here/src/permname -c 4 -l 6 -p 1 || echo "permname returned $?"
find . | _count
echo ""
echo "multi thread permname"
echo "----------------------"
mkdir $testdir/permname.$$/b
cd $testdir/permname.$$/b
mkdir $TEST_DIR/permname.$$/b
cd $TEST_DIR/permname.$$/b
$here/src/permname -c 4 -l 6 -p 4 || echo "permname returned $?"
find . | _count
+3 -6
View File
@@ -38,8 +38,7 @@ _cleanup()
{
cd /
rm -f $tmp.*
rm -rf $testdir/$seq
_cleanup_testdir
rm -rf $TEST_DIR/$seq
}
# get standard environment, filters and checks
@@ -50,8 +49,6 @@ _cleanup()
_supported_fs generic
_supported_os IRIX Linux
_setup_testdir
status=1 # default failure
sourcefile=$tmp.nametest
seed=1
@@ -66,8 +63,8 @@ while [ $i -le $num_filenames ]; do
let i=$i+1
done
mkdir $testdir/$seq
cd $testdir/$seq
mkdir $TEST_DIR/$seq
cd $TEST_DIR/$seq
$here/src/nametest -l $sourcefile -s $seed -i $iterations -z
# success, all done
+2 -5
View File
@@ -35,8 +35,7 @@ _cleanup()
{
cd /
rm -f $tmp.*
rm -f $testdir/DBtest*.{pag,dir}
_cleanup_testdir
rm -f $TEST_DIR/DBtest*.{pag,dir}
}
# filter random number output from dbtest
@@ -58,11 +57,9 @@ _filter_dbtest()
_supported_fs generic
_supported_os IRIX Linux
_setup_testdir
rm -f $seqres.full
cd $testdir
cd $TEST_DIR
$here/src/dbtest -l 5 -n 1000 2>&1 | tee -a $seqres.full | _filter_dbtest
+1 -4
View File
@@ -37,7 +37,6 @@ _cleanup()
cd /
rm -f $tmp.*
[ -n "$out" ] && rm -rf $out
_cleanup_testdir
}
# get standard environment, filters and checks
@@ -48,9 +47,7 @@ _cleanup()
_supported_fs generic
_supported_os IRIX Linux
_setup_testdir
out=$testdir/dirstress.$$
out=$TEST_DIR/dirstress.$$
rm -f $seqres.full
+2 -5
View File
@@ -41,8 +41,7 @@ _cleanup()
# such that what it has is greater the 1024 chars and will
# stop and complain - so get rid of complaint
# Ref. pv#935754
rm -rf $testdir/fsstress.$$.* 2>&1 | grep -v 'Path too long'
_cleanup_testdir
rm -rf $TEST_DIR/fsstress.$$.* 2>&1 | grep -v 'Path too long'
}
_filesize()
@@ -60,7 +59,7 @@ _do_test()
_param="$2"
_count="$3"
out=$testdir/fsstress.$$.$_n
out=$TEST_DIR/fsstress.$$.$_n
rm -rf $out
if ! mkdir $out
then
@@ -93,8 +92,6 @@ _do_test()
_supported_fs generic
_supported_os IRIX Linux
_setup_testdir
rm -f $seqres.full
echo "brevity is wit..."
+2 -4
View File
@@ -35,8 +35,7 @@ _cleanup()
{
cd /
rm -f $tmp.*
rm -rf $testdir/truncfile.$$.*
_cleanup_testdir
rm -rf $TEST_DIR/truncfile.$$.*
}
# get standard environment, filters and checks
@@ -47,7 +46,6 @@ _supported_fs generic
_supported_os IRIX Linux
_require_sparse_files
_setup_testdir
# ensure EOF preallocation doesn't massively extend the runtime of this test
# by limiting the amount of preallocation and therefore the amount of blocks
@@ -62,7 +60,7 @@ echo "brevity is wit..."
echo "------"
echo "test 1"
echo "------"
if ! src/truncfile -c 10000 $testdir/truncfile.$$.0 >$tmp.out 2>&1
if ! src/truncfile -c 10000 $TEST_DIR/truncfile.$$.0 >$tmp.out 2>&1
then
out=`cat $tmp.out`
echo "truncfile returned $? : \"$out\""
+3 -10
View File
@@ -29,21 +29,16 @@ echo "QA output created by $seq"
here=`pwd`
tmp=/tmp/$$
status=0 # success is the default!
trap "_cleanup; rm -f $tmp.* $testfile; exit \$status" 0 1 2 3 15
trap "rm -f $tmp.* $testfile; exit \$status" 0 1 2 3 15
# get standard environment, filters and checks
. ./common/rc
. ./common/filter
. ./common/attr
_cleanup()
{
_cleanup_testdir
}
_filter()
{
sed "s#$testdir[^ :]*#<TESTFILE>#g;
sed "s#$TEST_DIR[^ :]*#<TESTFILE>#g;
s#$tmp[^ :]*#<TMPFILE>#g" $1
}
@@ -83,11 +78,9 @@ _supported_os Linux
_require_attrs
_setup_testdir
rm -f $seqres.full
testfile=$testdir/attribute_$$
testfile=$TEST_DIR/attribute_$$
echo "*** list non-existant file"
_attr_list $testfile
-1
View File
@@ -36,7 +36,6 @@ ITERATIONS=10
_cleanup()
{
cd /
_cleanup_testdir
trap 0 1 2 3 15
exit $status
+1 -4
View File
@@ -35,7 +35,6 @@ _cleanup()
{
cd /
rm -f $tmp.*
_cleanup_testdir
}
# get standard environment, filters and checks
@@ -49,10 +48,8 @@ _supported_os IRIX Linux
_require_attrs
_setup_testdir
FSSTRESS_ARGS=`_scale_fsstress_args \
-d $testdir/fsstress \
-d $TEST_DIR/fsstress \
-f allocsp=0 \
-f freesp=0 \
-f bulkstat=0 \
+2 -5
View File
@@ -34,8 +34,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup()
{
cd /
rm -rf $testdir/fstest.$$.* $tmp.*
_cleanup_testdir
rm -rf $TEST_DIR/fstest.$$.* $tmp.*
}
# get standard environment, filters and checks
@@ -47,7 +46,7 @@ _do_test()
_n="$1"
_param="$2"
out=$testdir/fstest.$$.$_n
out=$TEST_DIR/fstest.$$.$_n
rm -rf $out
if ! mkdir $out
then
@@ -156,8 +155,6 @@ _process_args "$@"
echo "Params are for $param_type" >>$seqres.full
echo "Params: n = $numchildren l = $numloops f = $numfiles" >>$seqres.full
_setup_testdir
_check_test_fs
# Options:
+2 -5
View File
@@ -34,8 +34,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup()
{
cd /
rm -rf $testdir/fsx.* $tmp.*
_cleanup_testdir
rm -rf $TEST_DIR/fsx.* $tmp.*
}
# get standard environment, filters and checks
@@ -47,7 +46,7 @@ _do_test()
_n="$1"
_param="$2"
out=$testdir/fsx
out=$TEST_DIR/fsx
rm -rf $out
if ! mkdir $out
then
@@ -136,8 +135,6 @@ _process_args "$@"
echo "Params are for $param_type" >>$seqres.full
echo "Params: n = $numops1 N = $numops2 l = $filelen" >>$seqres.full
_setup_testdir
rm -f $seqres.full
echo "brevity is wit..."
+4 -6
View File
@@ -41,13 +41,12 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup()
{
[ -n "$testdir" ] && rm -f $file
_cleanup_testdir
[ -n "$TEST_DIR" ] && rm -f $file
}
_testfilter()
{
sed -e "s#$testdir#TESTDIR#g"
sed -e "s#$TEST_DIR#TESTDIR#g"
}
_filefilter()
@@ -65,12 +64,11 @@ _require_attrs
rm -f $seqres.full
_setup_testdir
_need_to_be_root
echo "QA output created by $seq"
echo ""
file=$testdir/$seq.file
file=$TEST_DIR/$seq.file
user=`grep ':all=:all=' /etc/capability | tail -1 | $AWK_PROG -F: '{print $1}'`
uid=`_cat_passwd | grep $user | $AWK_PROG -F: '{print $3}'`
@@ -149,7 +147,7 @@ echo "list EA on file"
${ATTR_PROG} -R -l $file | _filefilter
chown $uid $file
chmod ugo+w $testdir
chmod ugo+w $TEST_DIR
echo "as non-root call writemod"
$runas -u $uid src/writemod $file 2>&1 | _filefilter
-3
View File
@@ -78,8 +78,6 @@ _supported_os IRIX
_require_scratch
_require_attrs
_setup_testdir
TARGET_DIR=$SCRATCH_MNT
[ "$FSTYP" == "xfs" ] && TARGET_DIR=$TEST_DIR
cd $TARGET_DIR
@@ -245,7 +243,6 @@ echo "list root EAs: none"
${ATTR_PROG} -R -l foo
cd /
_cleanup_testdir
# Check the filesystem
_check_scratch_fs
-1
View File
@@ -88,7 +88,6 @@ _require_acls
# get dir
#export FILE_SYS=xfs
_require_scratch
_setup_testdir
cd $TARGET_DIR
rm -rf $seq.dir1 # in case file is left over from previous runs.
+3 -5
View File
@@ -69,19 +69,17 @@ tar -cvf $TEMP_DIR/$TAR_FILE $POPULATED_DIR >>$seqres.full 2>&1
# create f/s
_require_scratch
_setup_testdir
# untar on f/s
cd $testdir
cd $TEST_DIR
tar -xRvf $TEMP_DIR/$TAR_FILE >>$seqres.full 2>&1
cd $here
# use diff -qr to compare
ls -R -l ${testdir}${POPULATED_DIR} >>$seqres.full 2>&1
diff -qr $POPULATED_DIR ${testdir}${POPULATED_DIR}
ls -R -l ${TEST_DIR}${POPULATED_DIR} >>$seqres.full 2>&1
diff -qr $POPULATED_DIR ${TEST_DIR}${POPULATED_DIR}
cd /
_cleanup_testdir
_check_scratch_fs
status=0
+2 -5
View File
@@ -34,8 +34,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup()
{
cd /
rm -rf $testdir/fsx.* $tmp.*
_cleanup_testdir
rm -rf $TEST_DIR/fsx.* $tmp.*
}
# get standard environment, filters and checks
@@ -47,7 +46,7 @@ _do_test()
_n="$1"
_param="$2"
out=$testdir/fsx
out=$TEST_DIR/fsx
rm -rf $out
if ! mkdir $out
then
@@ -137,8 +136,6 @@ _process_args "$@"
echo "Params are for $param_type" >>$seqres.full
echo "Params: n = $numops1 N = $numops2 l = $filelen" >>$seqres.full
_setup_testdir
rm -f $seqres.full
echo "brevity is wit..."
+3 -6
View File
@@ -34,8 +34,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup()
{
cd /
rm -f $testdir/aio-stress.$$.*
_cleanup_testdir
rm -f $TEST_DIR/aio-stress.$$.*
}
# get standard environment, filters and checks
@@ -49,11 +48,11 @@ _do_test()
_count="$3"
_nproc="$4"
_files="$testdir/aiostress.$$.$_n"
_files="$TEST_DIR/aiostress.$$.$_n"
__proc=$_nproc
[ $__proc -gt 1 ] && _param="-t $__proc $_param"
while [ $__proc -gt 1 ]; do
_files="$_files $testdir/aiostress.$$.$_n.$__proc"
_files="$_files $TEST_DIR/aiostress.$$.$_n.$__proc"
let __proc=$__proc-1
done
rm -f $_files
@@ -80,8 +79,6 @@ _supported_os Linux
[ -x $here/ltp/aio-stress ] || _notrun "aio-stress not built for this platform"
_setup_testdir
echo "brevity is wit..."
count=1000

Some files were not shown because too many files have changed in this diff Show More