From 401680a11c4fb08d749d1d75598c7705273e5860 Mon Sep 17 00:00:00 2001 From: Dave Chinner Date: Fri, 15 Mar 2013 12:28:03 +0000 Subject: [PATCH] xfstests: fix _link_out_file callers 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 Reviewed-by: Phil White Signed-off-by: Rich Johnston --- common.rc | 26 +++++++++++++------------- tests/generic/088 | 3 ++- tests/generic/097 | 7 ++++--- tests/xfs/018 | 9 +++++---- tests/xfs/022 | 3 ++- tests/xfs/023 | 3 ++- tests/xfs/030 | 3 ++- tests/xfs/031 | 3 ++- tests/xfs/033 | 3 ++- tests/xfs/035 | 3 ++- tests/xfs/036 | 3 ++- tests/xfs/039 | 3 ++- tests/xfs/043 | 3 ++- tests/xfs/055 | 3 ++- tests/xfs/071 | 7 ++++--- tests/xfs/082 | 9 +++++---- tests/xfs/096 | 7 ++++--- tests/xfs/146 | 3 ++- 18 files changed, 59 insertions(+), 42 deletions(-) diff --git a/common.rc b/common.rc index 1caa0bd1..e3ea7dd6 100644 --- 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() diff --git a/tests/generic/088 b/tests/generic/088 index 031e85e2..9d033381 100755 --- a/tests/generic/088 +++ b/tests/generic/088 @@ -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 diff --git a/tests/generic/097 b/tests/generic/097 index 373ee642..102c558e 100755 --- a/tests/generic/097 +++ b/tests/generic/097 @@ -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 diff --git a/tests/xfs/018 b/tests/xfs/018 index d684ccd7..2a4c8f93 100755 --- a/tests/xfs/018 +++ b/tests/xfs/018 @@ -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 diff --git a/tests/xfs/022 b/tests/xfs/022 index a733f5b8..c2406933 100755 --- a/tests/xfs/022 +++ b/tests/xfs/022 @@ -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 diff --git a/tests/xfs/023 b/tests/xfs/023 index 9cea5a79..6410b988 100755 --- a/tests/xfs/023 +++ b/tests/xfs/023 @@ -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 diff --git a/tests/xfs/030 b/tests/xfs/030 index 4918ef29..df3c2b5a 100755 --- a/tests/xfs/030 +++ b/tests/xfs/030 @@ -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 # diff --git a/tests/xfs/031 b/tests/xfs/031 index 467638fe..cc2daca1 100755 --- a/tests/xfs/031 +++ b/tests/xfs/031 @@ -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() { diff --git a/tests/xfs/033 b/tests/xfs/033 index 208ed8f8..262d262d 100755 --- a/tests/xfs/033 +++ b/tests/xfs/033 @@ -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 # diff --git a/tests/xfs/035 b/tests/xfs/035 index bec87ca2..deb70ede 100755 --- a/tests/xfs/035 +++ b/tests/xfs/035 @@ -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 diff --git a/tests/xfs/036 b/tests/xfs/036 index 056ce990..2ef82a7f 100755 --- a/tests/xfs/036 +++ b/tests/xfs/036 @@ -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 diff --git a/tests/xfs/039 b/tests/xfs/039 index d5982f09..eb04ff4f 100755 --- a/tests/xfs/039 +++ b/tests/xfs/039 @@ -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 diff --git a/tests/xfs/043 b/tests/xfs/043 index 35b195b1..11caf95d 100755 --- a/tests/xfs/043 +++ b/tests/xfs/043 @@ -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 diff --git a/tests/xfs/055 b/tests/xfs/055 index 8c648c80..bac08268 100755 --- a/tests/xfs/055 +++ b/tests/xfs/055 @@ -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 diff --git a/tests/xfs/071 b/tests/xfs/071 index c4c37bc5..6d6eceef 100755 --- a/tests/xfs/071 +++ b/tests/xfs/071 @@ -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() diff --git a/tests/xfs/082 b/tests/xfs/082 index d38fb0ce..83b5708c 100755 --- a/tests/xfs/082 +++ b/tests/xfs/082 @@ -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 diff --git a/tests/xfs/096 b/tests/xfs/096 index 9bb6b910..a011cabd 100755 --- a/tests/xfs/096 +++ b/tests/xfs/096 @@ -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 diff --git a/tests/xfs/146 b/tests/xfs/146 index 14060188..87adba46 100755 --- a/tests/xfs/146 +++ b/tests/xfs/146 @@ -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 -- 2.39.5