xfstests: RESULTS_DIR needs to be an absolute path

Some tests 'cd <somedir>' and then direct output to $RESULT_DIR,
which fails if the current working directory is not $here.
Regardless, if an external results directory is to be used it needs
to have a full path specified and the use of $here as the base of
the results files is completely incorrect.

Hence change all the $here/$seqres* references to simply be
$seqres*, and instead encode the full path to the results in
$RESULT_DIR.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Phil White <pwhite@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
This commit is contained in:
Dave Chinner
2013-03-15 12:28:06 +00:00
committed by Rich Johnston
parent 0b1e8abd4a
commit e5c7cd83c4
33 changed files with 247 additions and 258 deletions
+4 -4
View File
@@ -192,7 +192,7 @@ _mark_iteration()
#
_chain()
{
$AWK_PROG -v full_file=$here/$seqres.full -v verify=$verify <$tmp.config '
$AWK_PROG -v full_file=$seqres.full -v verify=$verify <$tmp.config '
BEGIN { nfile = 0 }
/^\#/ { next }
{ file[nfile] = $1
@@ -240,7 +240,7 @@ END { srand('$iter')
}
}
}' \
| tee -a $here/$seqres.full | sh
| tee -a $seqres.full | sh
}
_check()
@@ -294,7 +294,7 @@ _cleanup()
fi
}
rm -f $here/$seqres.full
rm -f $seqres.full
status=0
_cleanup
status=1
@@ -308,7 +308,7 @@ _setup
for iter in 1 2 3 4 5
do
echo -n "iter $iter chain ... "
echo "iter $iter" >> $here/$seqres.full
echo "iter $iter" >> $seqres.full
_chain
_check
if [ -f $tmp.bad ]
+1 -1
View File
@@ -66,7 +66,7 @@ rm -f $seqres.full
cd $testdir
$here/src/dbtest -l 5 -n 1000 2>&1 | tee -a $here/$seqres.full | _filter_dbtest
$here/src/dbtest -l 5 -n 1000 2>&1 | tee -a $seqres.full | _filter_dbtest
# success, all done
exit
+6 -6
View File
@@ -80,11 +80,11 @@ _do_test()
if ! $FSSTRESS_PROG $_param $FSSTRESS_AVOID -v -m 8 -n $_count -d $out >>$dbgoutfile 2>&1
then
echo " fsstress (count=$_count) returned $? - see $seqres.full"
echo "--------------------------------------" >>$here/$seqres.full
echo "$_n - output from fsstress:" >>$here/$seqres.full
echo "--------------------------------------" >>$here/$seqres.full
echo "<NOT LOGGED>" >>$here/$seqres.full
#cat $tmp.out >>$here/$seqres.full
echo "--------------------------------------" >>$seqres.full
echo "$_n - output from fsstress:" >>$seqres.full
echo "--------------------------------------" >>$seqres.full
echo "<NOT LOGGED>" >>$seqres.full
#cat $tmp.out >>$seqres.full
status=1
fi
@@ -98,7 +98,7 @@ _supported_os IRIX Linux
_setup_testdir
rm -f $here/$seqres.full
rm -f $seqres.full
echo "brevity is wit..."
count=1000
+1 -1
View File
@@ -110,7 +110,7 @@ _process_args()
# real QA test starts here
rm -f $here/$seqres.full
rm -f $seqres.full
_supported_fs generic
_supported_os IRIX Linux
+5 -5
View File
@@ -80,10 +80,10 @@ _do_test()
cd $out
if ! $here/ltp/fsx $_param -P $here $seq.$_n &>/dev/null
then
echo " fsx ($_param) failed, $? - compare $seq.$_n.{good,bad,fsxlog}"
mv $out/$seq.$_n $here/$seq.$_n.full
od -xAx $here/$seq.$_n.full > $here/$seq.$_n.bad
od -xAx $here/$seq.$_n.fsxgood > $here/$seq.$_n.good
echo " fsx ($_param) failed, $? - compare $seqres.$_n.{good,bad,fsxlog}"
mv $out/$seq.$_n $seqres.$_n.full
od -xAx $seqres.$_n.full > $seqres.$_n.bad
od -xAx $seqres.$_n.fsxgood > $seqres.$_n.good
status=1
exit
fi
@@ -141,7 +141,7 @@ echo "Params: n = $numops1 N = $numops2 l = $filelen" >>$seqres.full
_setup_testdir
rm -f $here/$seqres.full
rm -f $seqres.full
echo "brevity is wit..."
_check_test_fs
+2 -2
View File
@@ -75,8 +75,8 @@ mtab()
echo directory entries:
ls | grep mtab
echo directory entries >> $here/$seqres.full
ls -li >> $here/$seqres.full
echo directory entries >> $seqres.full
ls -li >> $seqres.full
}
# directory with only a few entries
+4 -4
View File
@@ -64,10 +64,10 @@ rm -rf $POPULATED_DIR
rm -f $TEMP_DIR/$TAR_FILE
# Create the new directory structure
_populate_fs -n $NDIRS -f $NFILES -d $DEPTH -r $POPULATED_DIR -s $SIZE >>$here/$seqres.full 2>&1
_populate_fs -n $NDIRS -f $NFILES -d $DEPTH -r $POPULATED_DIR -s $SIZE >>$seqres.full 2>&1
# Then tar up the directory structure
tar -cvf $TEMP_DIR/$TAR_FILE $POPULATED_DIR >>$here/$seqres.full 2>&1
tar -cvf $TEMP_DIR/$TAR_FILE $POPULATED_DIR >>$seqres.full 2>&1
# create f/s
_require_scratch
@@ -75,12 +75,12 @@ _setup_testdir
# untar on f/s
cd $testdir
tar -xRvf $TEMP_DIR/$TAR_FILE >>$here/$seqres.full 2>&1
tar -xRvf $TEMP_DIR/$TAR_FILE >>$seqres.full 2>&1
cd $here
# use diff -qr to compare
ls -R -l ${testdir}${POPULATED_DIR} >>$here/$seqres.full 2>&1
ls -R -l ${testdir}${POPULATED_DIR} >>$seqres.full 2>&1
diff -qr $POPULATED_DIR ${testdir}${POPULATED_DIR}
cd /
+2 -2
View File
@@ -81,7 +81,7 @@ _do_test()
if ! $here/ltp/fsx $_param -P $here $seq.$_n &>/dev/null
then
echo " fsx ($_param) returned $? - see $seq.$_n.full"
mv $seq.$_n.fsxlog $here/$seq.$_n.full
mv $seq.$_n.fsxlog $seqres.$_n.full
status=1
exit
fi
@@ -142,7 +142,7 @@ echo "Params: n = $numops1 N = $numops2 l = $filelen" >>$seqres.full
_setup_testdir
rm -f $here/$seqres.full
rm -f $seqres.full
echo "brevity is wit..."
_check_test_fs
+1 -1
View File
@@ -69,7 +69,7 @@ time2=`_access_time $testfile | tee -a $seqres.full`
cd /
umount $TEST_DIR
_test_mount
time3=`_access_time $testfile | tee -a $here/$seqres.full`
time3=`_access_time $testfile | tee -a $seqres.full`
delta1=`expr $time2 - $time1`
delta2=`expr $time3 - $time1`
+4 -4
View File
@@ -41,7 +41,7 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
_filter_num()
{
tee -a $here/$seqres.full |\
tee -a $seqres.full |\
sed -e 's/[0-9][0-9]* inodes/I inodes/g' \
-e 's/[0-9][0-9]* paths/P paths/g' \
-e 's/seed = [0-9][0-9]*/seed = S/'
@@ -57,11 +57,11 @@ _fsstress()
count=2000
args=`_scale_fsstress_args -d $out -n $count -p 7`
echo "fsstress $args" >> tee -a $here/$seqres.full
if ! $FSSTRESS_PROG $args | tee -a $here/$seqres.full | _filter_num
echo "fsstress $args" >> tee -a $seqres.full
if ! $FSSTRESS_PROG $args | tee -a $seqres.full | _filter_num
then
echo " fsstress $args returned $?"
cat $tmp.out | tee -a $here/$seqres.full
cat $tmp.out | tee -a $seqres.full
status=1
fi
}
+4 -4
View File
@@ -45,7 +45,7 @@ FSX_ARGS="-q -l $FSX_FILE_SIZE -o 65536 -S 191110531 -N 100000"
_filter_num()
{
tee -a $here/$seqres.full |\
tee -a $seqres.full |\
sed -e 's/[0-9][0-9]* inodes/I inodes/g' \
-e 's/[0-9][0-9]* paths/P paths/g' \
-e 's/seed = [0-9][0-9]*/seed = S/'
@@ -64,11 +64,11 @@ _fsstress()
-f rename=10 -f fsync=2 -f write=15 -f dwrite=15 \
-n $count -d $out -p 7`
echo "fsstress $args" >> tee -a $here/$seqres.full
if ! su $qa_user -c "$FSSTRESS_PROG $args" | tee -a $here/$seqres.full | _filter_num
echo "fsstress $args" >> tee -a $seqres.full
if ! su $qa_user -c "$FSSTRESS_PROG $args" | tee -a $seqres.full | _filter_num
then
echo " fsstress $args returned $?"
cat $tmp.out | tee -a $here/$seqres.full
cat $tmp.out | tee -a $seqres.full
status=1
fi
}
+2 -2
View File
@@ -47,7 +47,7 @@ _workout()
enospc_time=2
out=$SCRATCH_MNT/fsstress.$$
args=`_scale_fsstress_args -p128 -n999999999 -f setattr=1 $FSSTRESS_AVOID -d $out`
echo "fsstress $args" >> $here/$seqres.full
echo "fsstress $args" >> $seqres.full
$FSSTRESS_PROG $args > /dev/null 2>&1 &
pid=$!
echo "Run dd writers in parallel"
@@ -55,7 +55,7 @@ _workout()
do
# File will be opened with O_TRUNC each time
dd if=/dev/zero of=$SCRATCH_MNT/SPACE_CONSUMER bs=1M \
>> $here/$seqres.full 2>&1
>> $seqres.full 2>&1
sleep $enospc_time
done
kill $pid
+2 -2
View File
@@ -50,7 +50,7 @@ _workout()
enospc_time=2
out=$SCRATCH_MNT/fsstress.$$
args=`_scale_fsstress_args -p128 -n999999999 -f setattr=1 $FSSTRESS_AVOID -d $out`
echo "fsstress $args" >> $here/$seqres.full
echo "fsstress $args" >> $seqres.full
# Grant chown capability
cp $FSSTRESS_PROG $tmp.fsstress.bin
if [ "`whereis setcap`" == "setcap:" ]; then
@@ -67,7 +67,7 @@ _workout()
# File will be opened with O_TRUNC each time
su $qa_user -c "dd if=/dev/zero \
of=$SCRATCH_MNT/SPACE_CONSUMER bs=1M " \
>> $here/$seqres.full 2>&1
>> $seqres.full 2>&1
sleep $enospc_time
done
+6 -6
View File
@@ -64,7 +64,7 @@ disallow_fail_make_request()
start_fail_scratch_dev()
{
echo "Force SCRATCH_DEV device failure"
echo " echo 1 > /sys/block/$SCRATCH_BDEV/make-it-fail" >> $here/$seqres.full
echo " echo 1 > /sys/block/$SCRATCH_BDEV/make-it-fail" >> $seqres.full
echo 1 > /sys/block/$SCRATCH_BDEV/make-it-fail
}
@@ -72,7 +72,7 @@ start_fail_scratch_dev()
stop_fail_scratch_dev()
{
echo "Make SCRATCH_DEV device operable again"
echo " echo 0 > /sys/block/$SCRATCH_BDEV/make-it-fail" >> $here/$seqres.full
echo " echo 0 > /sys/block/$SCRATCH_BDEV/make-it-fail" >> $seqres.full
echo 0 > /sys/block/$SCRATCH_BDEV/make-it-fail
}
@@ -141,12 +141,12 @@ _workout()
echo ""
echo "Start fsstress.."
echo ""
echo "fsstress $args" >> $here/$seqres.full
echo "fsstress $args" >> $seqres.full
$FSSTRESS_PROG $args > /dev/null 2>&1 &
fs_pid=$!
echo "Start fio.."
cat $tmp-$seq.fio >> $seqres.full
$FIO_PROG $tmp-$seq.fio >> $here/$seqres.full 2>&1 &
$FIO_PROG $tmp-$seq.fio >> $seqres.full 2>&1 &
fio_pid=$!
# Let's it work for awhile, and force device failure
@@ -156,7 +156,7 @@ _workout()
# that so buffered write(2) may succeed, but any integrity operations
# such as (sync, fsync, fdatasync, direct-io) should fail.
dd if=/dev/zero of=$SCRATCH_MNT/touch_failed_filesystem count=1 bs=4k conv=fsync \
>> $here/$seqres.full 2>&1 && \
>> $seqres.full 2>&1 && \
_fail "failed: still able to perform integrity fsync on $SCRATCH_MNT"
kill $fs_pid
@@ -178,7 +178,7 @@ _workout()
# real QA test starts here
_scratch_mkfs >> $here/$seqres.full 2>&1 || _fail "mkfs failed"
_scratch_mkfs >> $seqres.full 2>&1 || _fail "mkfs failed"
_scratch_mount || _fail "mount failed"
allow_fail_make_request
_workout
+9 -9
View File
@@ -75,14 +75,14 @@ _do_test()
fi
else
echo " randholes returned $? - see $seq.out.full"
echo "--------------------------------------" >>$here/$seq.out.full
echo "$_n - output from randholes:" >>$here/$seq.out.full
echo "--------------------------------------" >>$here/$seq.out.full
cat $tmp.out >>$here/$seq.out.full
echo "--------------------------------------" >>$here/$seq.out.full
echo "$_n - output from bmap:" >>$here/$seq.out.full
echo "--------------------------------------" >>$here/$seq.out.full
xfs_bmap -vvv $out >>$here/$seq.out.full
echo "--------------------------------------" >>$seqres.full
echo "$_n - output from randholes:" >>$seqres.full
echo "--------------------------------------" >>$seqres.full
cat $tmp.out >>$seqres.full
echo "--------------------------------------" >>$seqres.full
echo "$_n - output from bmap:" >>$seqres.full
echo "--------------------------------------" >>$seqres.full
xfs_bmap -vvv $out >>$seqres.full
status=1
fi
}
@@ -93,7 +93,7 @@ _supported_os IRIX Linux
_setup_testdir
rm -f $here/$seq.out.full
rm -f $seqres.full
# Note on special numbers here.
#
+15 -15
View File
@@ -64,7 +64,7 @@ _do_test()
echo "-----------------------------------------------"
if ! $here/src/holes $_param $out >$tmp.out
then
echo " holes returned $? - see $seq.out.full"
echo " holes returned $? - see $seqres.full"
failed=1
status=1
fi
@@ -80,7 +80,7 @@ _do_test()
if [ $count -ne $_count ]
then
echo " unexpected number of holes - see $seq.out.full"
echo " unexpected number of holes - see $seqres.full"
status=1
failed=1
fi
@@ -88,18 +88,18 @@ _do_test()
if [ $failed -eq 1 ]
then
echo "--------------------------------------" >>$here/$seq.out.full
echo "$_n - output from holes:" >>$here/$seq.out.full
echo "--------------------------------------" >>$here/$seq.out.full
cat $tmp.out >>$here/$seq.out.full
echo "--------------------------------------" >>$here/$seq.out.full
echo "$_n - output from bmap:" >>$here/$seq.out.full
echo "--------------------------------------" >>$here/$seq.out.full
xfs_bmap -vvv $out >>$here/$seq.out.full
echo "--------------------------------------" >>$here/$seq.out.full
echo "$_n - output from ls -li:" >>$here/$seq.out.full
echo "--------------------------------------" >>$here/$seq.out.full
ls -li $out >>$here/$seq.out.full
echo "--------------------------------------" >>$seqres.full
echo "$_n - output from holes:" >>$seqres.full
echo "--------------------------------------" >>$seqres.full
cat $tmp.out >>$seqres.full
echo "--------------------------------------" >>$seqres.full
echo "$_n - output from bmap:" >>$seqres.full
echo "--------------------------------------" >>$seqres.full
xfs_bmap -vvv $out >>$seqres.full
echo "--------------------------------------" >>$seqres.full
echo "$_n - output from ls -li:" >>$seqres.full
echo "--------------------------------------" >>$seqres.full
ls -li $out >>$seqres.full
status=1
fi
}
@@ -110,7 +110,7 @@ _supported_os IRIX Linux
_setup_testdir
rm -f $here/$seq.out.full
rm -f $seqres.full
# small & fairly dense
_do_test 1 "-l 40960000 -b 40960 -i 10 -c 1" 100
+2 -2
View File
@@ -45,11 +45,11 @@ _require_tape $TAPE_DEV
_create_dumpdir_fill
# ensure file/dir timestamps precede dump timestamp
sleep 2
src/bstat $SCRATCH_MNT >>$here/$seqres.full
src/bstat $SCRATCH_MNT >>$seqres.full
_erase_hard
_do_dump
_append_dumpdir_fill
src/bstat $SCRATCH_MNT >>$here/$seqres.full
src/bstat $SCRATCH_MNT >>$seqres.full
_erase_hard
_do_dump -l 1
_do_restore
+3 -3
View File
@@ -52,11 +52,11 @@ isize=0
_scratch_mkfs_xfs | _filter_mkfs >$seqres.full 2>$tmp.mkfs
[ $? -eq 0 ] && source $tmp.mkfs
if [ "$isize" -lt 1024 ]; then
_scratch_mkfs_xfs -i size=1024 >>$here/$seqres.full \
_scratch_mkfs_xfs -i size=1024 >>$seqres.full \
|| _notrun "Cannot mkfs for this test using MKFS_OPTIONS specified"
fi
_scratch_mount >>$here/$seqres.full || _fail "mount failed"
xfs_info $SCRATCH_MNT >>$here/$seqres.full
_scratch_mount >>$seqres.full || _fail "mount failed"
xfs_info $SCRATCH_MNT >>$seqres.full
cd $SCRATCH_MNT
echo ""
+15 -15
View File
@@ -82,8 +82,8 @@ _test_create()
p=dir2/dir3/dir4/file4
touch $p
#_print_names $p >>$here/$seqres.full
_print_names $p | tee -a $here/$seqres.full
#_print_names $p >>$seqres.full
_print_names $p | tee -a $seqres.full
_check_paths $SCRATCH_MNT/$p
}
@@ -133,13 +133,13 @@ _test_hardlink()
ln $p $x
done
_print_names $p >>$here/$seqres.full
_print_names $p >>$seqres.full
echo ""
echo "print out names and check after created hardlinks"
echo ""
for x in $paths; do
_print_names $x | tee -a $here/$seqres.full
_print_names $x | tee -a $seqres.full
_check_paths $SCRATCH_MNT/$x
done
@@ -163,7 +163,7 @@ _test_hardlink()
echo ""
for x in $paths; do
if [ -e $x ]; then
_print_names $x | tee -a $here/$seqres.full
_print_names $x | tee -a $seqres.full
_check_paths $SCRATCH_MNT/$x
fi
done
@@ -232,7 +232,7 @@ _test_rename()
_filter_num()
{
tee -a $here/$seqres.full |\
tee -a $seqres.full |\
sed -e 's/[0-9][0-9]* inodes/I inodes/g' \
-e 's/[0-9][0-9]* paths/P paths/g' \
-e 's/seed = [0-9][0-9]*/seed = S/'
@@ -257,7 +257,7 @@ _test_fsstress()
if ! $FSSTRESS_PROG $args | _filter_num
then
echo " fsstress $args returned $?"
cat $tmp.out | tee -a $here/$seqres.full
cat $tmp.out | tee -a $seqres.full
status=1
fi
@@ -286,8 +286,8 @@ _test_dirstress()
if ! $here/src/dirstress $args >$tmp.out 2>&1 | _filter_num
then
echo " dirstress failed"
echo "*** dirstress $args" | tee -a $here/$seqres.full
cat $tmp.out >>$here/$seqres.full
echo "*** dirstress $args" | tee -a $seqres.full
cat $tmp.out >>$seqres.full
status=1
exit
fi
@@ -297,8 +297,8 @@ _test_dirstress()
if ! $here/src/dirstress $args >$tmp.out 2>&1 | _filter_num
then
echo " dirstress failed"
echo "*** dirstress $args" | tee -a $here/$seqres.full
cat $tmp.out >>$here/$seqres.full
echo "*** dirstress $args" | tee -a $seqres.full
cat $tmp.out >>$seqres.full
status=1
exit
fi
@@ -318,16 +318,16 @@ _require_scratch
_require_attrs
_need_to_be_root
rm -f $here/$seqres.full
rm -f $seqres.full
echo "mkfs"
_scratch_mkfs_xfs >>$here/$seqres.full 2>&1 \
_scratch_mkfs_xfs >>$seqres.full 2>&1 \
|| _fail "mkfs scratch failed"
_scratch_mkfs_xfs -i parent=1 >>$here/$seqres.full 2>&1 \
_scratch_mkfs_xfs -i parent=1 >>$seqres.full 2>&1 \
|| _notrun "parent inodes not supported"
echo "mount"
_scratch_mount >>$here/$seqres.full 2>&1 \
_scratch_mount >>$seqres.full 2>&1 \
|| _fail "mount failed: $MOUNT_OPTIONS"
# real QA test starts here
+4 -4
View File
@@ -104,16 +104,16 @@ _supported_os IRIX
_require_scratch
_require_attrs
rm -f $here/$seqres.full
rm -f $seqres.full
echo "mkfs"
_scratch_mkfs_xfs >>$here/$seqres.full 2>&1 \
_scratch_mkfs_xfs >>$seqres.full 2>&1 \
|| _fail "mkfs scratch failed"
_scratch_mkfs_xfs -i paths=1 >>$here/$seqres.full 2>&1 \
_scratch_mkfs_xfs -i paths=1 >>$seqres.full 2>&1 \
|| _notrun "i_paths not supported"
echo "mount"
_scratch_mount >>$here/$seqres.full 2>&1 \
_scratch_mount >>$seqres.full 2>&1 \
|| _fail "mount failed: $MOUNT_OPTIONS"
# real QA test starts here

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