]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfstests: fix _link_out_file callers
authorDave Chinner <dchinner@redhat.com>
Fri, 15 Mar 2013 12:28:03 +0000 (12:28 +0000)
committerRich Johnston <rjohnston@sgi.com>
Wed, 27 Mar 2013 02:41:17 +0000 (21:41 -0500)
Currently the callers pass $seq, rather than the full path to the
test. As a result, it creates the link in the top level directory
and it points nowhere.  Fix it to create the link in the correct
place.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Phil White <pwhite@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
18 files changed:
common.rc
tests/generic/088
tests/generic/097
tests/xfs/018
tests/xfs/022
tests/xfs/023
tests/xfs/030
tests/xfs/031
tests/xfs/033
tests/xfs/035
tests/xfs/036
tests/xfs/039
tests/xfs/043
tests/xfs/055
tests/xfs/071
tests/xfs/082
tests/xfs/096
tests/xfs/146

index 1caa0bd15ce297e11075a08f1a3fdbdd7cf683fb..e3ea7dd631fe580a7d13743e6af3b0917fc7aea2 100644 (file)
--- a/common.rc
+++ b/common.rc
@@ -1760,19 +1760,19 @@ _cleanup_testdir()
 
 _link_out_file()
 {
-   if [ -z "$1" ]; then
-      echo Error must pass \$seq.
-      exit
-   fi
-   rm -f $1
-   if [ "`uname`" == "IRIX64" ] || [ "`uname`" == "IRIX" ]; then
-      ln -s $1.irix $1
-   elif [ "`uname`" == "Linux" ]; then
-      ln -s $1.linux $1
-   else
-      echo Error test $seq does not run on the operating system: `uname`
-      exit
-   fi
+       if [ -z "$1" -o -z "$2" ]; then
+               echo Error must pass src and dst.
+               exit
+       fi
+       rm -f $2
+       if [ "`uname`" == "IRIX64" ] || [ "`uname`" == "IRIX" ]; then
+               ln -s $1.irix $2
+       elif [ "`uname`" == "Linux" ]; then
+               ln -s $1.linux $2
+       else
+               echo Error test $seq does not run on the operating system: `uname`
+               exit
+       fi
 }
 
 _die()
index 031e85e2524bff802617c8a47821abb89448add4..9d03338168ef9decd59c136a6558906cf914b043 100755 (executable)
@@ -23,6 +23,7 @@
 #-----------------------------------------------------------------------
 #
 
+seqfull=$0
 seq=`basename $0`
 seqres=$RESULT_DIR/$seq
 seqres=$RESULT_DIR/$seq
@@ -44,7 +45,7 @@ _filter()
 }
 
 # link correct .out file
-_link_out_file $seq.out
+_link_out_file $seq.out $seqfull.out
 
 # real QA test starts here
 _supported_fs generic
index 373ee642273132b40f15a529f5cc48badb5a342f..102c558e131929ef25887d10037b2a7c5ce87f78 100755 (executable)
@@ -27,6 +27,7 @@
 #-----------------------------------------------------------------------
 #
 
+seqfull=$0
 seq=`basename $0`
 seqres=$RESULT_DIR/$seq
 seqres=$RESULT_DIR/$seq
@@ -65,11 +66,11 @@ _umount_and_mount()
 
 # link correct .out file
 # This is done bacause udf and xfs print attrs in different orders.
-rm -rf $seq.out
+rm -rf $seqfull.out
 if [ "$FSTYP" == "xfs" ]; then
-    ln -s $seq.out.xfs $seq.out
+    ln -s $seq.out.xfs $seqfull.out
 else
-    ln -s $seq.out.udf $seq.out
+    ln -s $seq.out.udf $seqfull.out
 fi
 
 # real QA test starts here
index d684ccd78c7898df2616d5a3af8768c8fee05021..2a4c8f934d6f1b0696fd1db5eaee23d45d25661e 100755 (executable)
@@ -22,6 +22,7 @@
 #-----------------------------------------------------------------------
 #
 
+seqfull=$0
 seq=`basename $0`
 seqres=$RESULT_DIR/$seq
 seqres=$RESULT_DIR/$seq
@@ -55,7 +56,7 @@ _require_scratch
 _require_v2log
 
 # link correct .out file
-_link_out_file $seq.op
+_link_out_file $seq.op $seqfull.op
 
 
 echo "*** init FS"
@@ -90,13 +91,13 @@ do
     _check_log
 
     _print_operation
-    _cmp_op_output $seq.op $filtered
+    _cmp_op_output $seqfull.op $filtered
 
     _print_transaction_inode $start_blk
-    _cmp_output $seq.trans_inode $filtered
+    _cmp_output $seqfull.trans_inode $filtered
 
     _print_transaction_buf $start_blk
-    _cmp_output $seq.trans_buf $filtered
+    _cmp_output $seqfull.trans_buf $filtered
 done
 
 # got thru it all so we may have success
index a733f5b86f88749d4ee730fc517ed472c2a0e79f..c2406933c867ddb4e72100fab51c21c6c31ef8ac 100755 (executable)
@@ -25,6 +25,7 @@
 #-----------------------------------------------------------------------
 #
 
+seqfull=$0
 seq=`basename $0`
 seqres=$RESULT_DIR/$seq
 seqres=$RESULT_DIR/$seq
@@ -40,7 +41,7 @@ trap "rm -rf $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.dump
 
 # link correct .out file
-_link_out_file $seq.out
+_link_out_file $seq.out $seqfull.out
 
 # real QA test starts here
 _supported_fs xfs
index 9cea5a79d281287827298c7ca649c4899bcb26ae..6410b988e5b77ae2899d64c1a728ae6e97b558cd 100755 (executable)
@@ -23,6 +23,7 @@
 #-----------------------------------------------------------------------
 #
 
+seqfull=$0
 seq=`basename $0`
 seqres=$RESULT_DIR/$seq
 seqres=$RESULT_DIR/$seq
@@ -39,7 +40,7 @@ trap "rm -rf $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.dump
 
 # link correct .out file
-_link_out_file $seq.out
+_link_out_file $seq.out $seqfull.out
 
 # real QA test starts here
 _supported_fs xfs
index 4918ef2922aa06377c11353e5f2bc7864a27eda8..df3c2b5a07eafe60c9d605618a484668224f9fa3 100755 (executable)
@@ -22,6 +22,7 @@
 #-----------------------------------------------------------------------
 #
 
+seqfull=$0
 seq=`basename $0`
 seqres=$RESULT_DIR/$seq
 seqres=$RESULT_DIR/$seq
@@ -47,7 +48,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 . ./common.repair
 
 # link correct .out file
-_link_out_file $seq.out
+_link_out_file $seq.out $seqfull.out
 
 # nuke the superblock, AGI, AGF, AGFL; then try repair the damage
 #
index 467638fe7aecebd1c0b0c0eb2c831f0c168b4e28..cc2daca1b6c127b117d53e84557141ac76065f1b 100755 (executable)
@@ -22,6 +22,7 @@
 #-----------------------------------------------------------------------
 #
 
+seqfull=$0
 seq=`basename $0`
 seqres=$RESULT_DIR/$seq
 seqres=$RESULT_DIR/$seq
@@ -40,7 +41,7 @@ rm -f $seqres.full
 . ./common.filter
 
 # link correct .out file
-_link_out_file $seq.out
+_link_out_file $seq.out $seqfull.out
 
 _check_repair()
 {
index 208ed8f849a12b614b67d0adaa944d7c93751ba2..262d262d1bba291872d042a9bd23f5c7ca5cc3b7 100755 (executable)
@@ -22,6 +22,7 @@
 #-----------------------------------------------------------------------
 #
 
+seqfull=$0
 seq=`basename $0`
 seqres=$RESULT_DIR/$seq
 seqres=$RESULT_DIR/$seq
@@ -47,7 +48,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 . ./common.repair
 
 # link correct .out file
-_link_out_file $seq.out
+_link_out_file $seq.out $seqfull.out
 
 # nuke the root, rt bitmap, and rt summary inodes
 # 
index bec87ca2a173cca029e18ea17365786564d792f5..deb70ede31646a80b5980b9d61c58dda09a65294 100755 (executable)
@@ -22,6 +22,7 @@
 #-----------------------------------------------------------------------
 #
 
+seqfull=$0
 seq=`basename $0`
 seqres=$RESULT_DIR/$seq
 seqres=$RESULT_DIR/$seq
@@ -38,7 +39,7 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.dump
 
 # link correct .out file
-_link_out_file $seq.out
+_link_out_file $seq.out $seqfull.out
 
 # real QA test starts here
 _supported_fs xfs
index 056ce99044c632e94c9dbdd805e0f66a3b8ef0c6..2ef82a7fd8d75207a4636e0003d09d9bb1ac44c5 100755 (executable)
@@ -22,6 +22,7 @@
 #-----------------------------------------------------------------------
 #
 
+seqfull=$0
 seq=`basename $0`
 seqres=$RESULT_DIR/$seq
 seqres=$RESULT_DIR/$seq
@@ -38,7 +39,7 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.dump
 
 # link correct .out file
-_link_out_file $seq.out
+_link_out_file $seq.out $seqfull.out
 
 # real QA test starts here
 _supported_fs xfs
index d5982f0907a6f1950fede9b99f7d5853ac72712d..eb04ff4fb022b6954469c5b82866139f3f33457f 100755 (executable)
@@ -22,6 +22,7 @@
 #-----------------------------------------------------------------------
 #
 
+seqfull=$0
 seq=`basename $0`
 seqres=$RESULT_DIR/$seq
 seqres=$RESULT_DIR/$seq
@@ -38,7 +39,7 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.dump
 
 # link correct .out file
-_link_out_file $seq.out
+_link_out_file $seq.out $seqfull.out
 
 # real QA test starts here
 _supported_fs xfs
index 35b195b13ee43a62158d56d150241ed11d8764eb..11caf95d832c47142979d0c6f11660be182e674a 100755 (executable)
@@ -24,6 +24,7 @@
 #-----------------------------------------------------------------------
 #
 
+seqfull=$0
 seq=`basename $0`
 seqres=$RESULT_DIR/$seq
 seqres=$RESULT_DIR/$seq
@@ -40,7 +41,7 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.dump
 
 # link correct .out file
-_link_out_file $seq.out
+_link_out_file $seq.out $seqfull.out
 
 # real QA test starts here
 _supported_fs xfs
index 8c648c80a5016a28896486f69439e3bef067f316..bac082684f18e2064ee3b3b60100028a44225009 100755 (executable)
@@ -22,6 +22,7 @@
 #-----------------------------------------------------------------------
 #
 
+seqfull=$0
 seq=`basename $0`
 seqres=$RESULT_DIR/$seq
 seqres=$RESULT_DIR/$seq
@@ -38,7 +39,7 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.dump
 
 # link correct .out file
-_link_out_file $seq.out
+_link_out_file $seq.out $seqfull.out
 
 # real QA test starts here
 _supported_fs xfs
index c4c37bc589d16e52657edf090758235a8fc4ff0e..6d6eceef0f8ed51b956ec68ce299a24d40f6a48a 100755 (executable)
@@ -21,6 +21,7 @@
 #-----------------------------------------------------------------------
 #
 
+seqfull=$0
 seq=`basename $0`
 seqres=$RESULT_DIR/$seq
 seqres=$RESULT_DIR/$seq
@@ -46,11 +47,11 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 
 bitsperlong=`src/feature -w`
 # link correct .out file
-rm -f $seq.out
+rm -f $seqfull.out
 if [ "$bitsperlong" -eq 32 ]; then
-       ln -s $seq.out.32 $seq.out
+       ln -s $seq.out.32 $seqfull.out
 else
-       ln -s $seq.out.64 $seq.out
+       ln -s $seq.out.64 $seqfull.out
 fi
 
 _filter_io()
index d38fb0ce5ab487ffff893068b7b63684c56e3062..83b5708ca182431eb0bdd87ef8b669b58ab1c3b2 100755 (executable)
@@ -22,6 +22,7 @@
 #-----------------------------------------------------------------------
 #
 
+seqfull=$0
 seq=`basename $0`
 seqres=$RESULT_DIR/$seq
 seqres=$RESULT_DIR/$seq
@@ -56,7 +57,7 @@ _require_scratch
 _require_v2log 
 
 # link correct .out file
-_link_out_file $seq.op
+_link_out_file $seq.op $seqfull.op
 
 echo "*** init FS"
 umount $SCRATCH_DEV >/dev/null 2>&1
@@ -120,14 +121,14 @@ for s in sync nosync ; do
            :
        else
            _print_operation
-           _cmp_op_output $seq.op $filtered
+           _cmp_op_output $seqfull.op $filtered
        fi
 
        _print_transaction_inode $start
-       _cmp_output $seq.trans_inode $filtered
+       _cmp_output $seqfull.trans_inode $filtered
 
        _print_transaction_buf $start
-       _cmp_output $seq.trans_buf $filtered
+       _cmp_output $seqfull.trans_buf $filtered
     done
 done
 
index 9bb6b9108c69dfa108dbe44a222b16f702e68051..a011cabd76102884f66fa9714f0856987f55c4b8 100755 (executable)
@@ -23,6 +23,7 @@
 #-----------------------------------------------------------------------
 #
 
+seqfull=$0
 seq=`basename $0`
 seqres=$RESULT_DIR/$seq
 seqres=$RESULT_DIR/$seq
@@ -101,11 +102,11 @@ _require_scratch
 _require_v2log
 
 # choose .out file based on internal/external log
-rm -f $seq.out
+rm -f $seqfull.out
 if [ "$USE_EXTERNAL" = yes ]; then
-       ln -s $seq.external $seq.out
+       ln -s $seq.external $seqfull.out
 else
-       ln -s $seq.internal $seq.out
+       ln -s $seq.internal $seqfull.out
 fi
 
 # maximum log record size
index 14060188b12d3c64a5b80d2b503852307b4353e4..87adba469ef4218a55c8783fa1343bcad019d831 100755 (executable)
@@ -22,6 +22,7 @@
 #-----------------------------------------------------------------------
 #
 
+seqfull=$0
 seq=`basename $0`
 seqres=$RESULT_DIR/$seq
 seqres=$RESULT_DIR/$seq
@@ -54,7 +55,7 @@ _supported_fs xfs
 _supported_os Linux IRIX
 
 # link correct .out file
-_link_out_file $seq.out
+_link_out_file $seq.out $seqfull.out
 
 _require_scratch
 _scratch_mkfs_xfs >/dev/null 2>&1