Whamcloud - gitweb
LU-3582 test: Add run_test to Runtests 84/8384/2
authorKeith Mannthey <keith.mannthey@intel.com>
Mon, 25 Nov 2013 05:45:08 +0000 (13:45 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 9 Dec 2013 03:36:02 +0000 (03:36 +0000)
There is no run_test in this script so add one
so logging in Autotest will greatly improve.
It seems some of the test is dependant so I did a
very minimal change to get the better logging.

The patch is back-ported from the following patch:
Lustre-commit: c74be05495cd5b7489fdbb100cd7b6d15db32053
Lustre-change: http://review.whamcloud.com/7014

Signed-off-by: Keith Mannthey <keith.mannthey@intel.com>
Change-Id: I96d7fe464d81094842dc5939519d74f7168d96b1
Signed-off-by: Jian Yu <jian.yu@intel.com>
Reviewed-on: http://review.whamcloud.com/8384
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Wei Liu <wei3.liu@intel.com>
lustre/tests/runtests

index f6b3cd2..c49eba7 100755 (executable)
@@ -24,7 +24,7 @@ RUNTESTS_SRC=${RUNTESTS_SRC:-"/etc /bin"}
 [ "$MKDIRMANY" ] || MKDIRMANY="createmany -d"
 
 check_and_setup_lustre
 [ "$MKDIRMANY" ] || MKDIRMANY="createmany -d"
 
 check_and_setup_lustre
-
+test_1() {
 OSCTMP=`echo $MOUNT | tr "/" "."`
 USED=`df | awk "/$OSCTMP/ { print \\$3 }" | tail -n 1`
 USED=`expr $USED + 16` # Some space for the status file
 OSCTMP=`echo $MOUNT | tr "/" "."`
 USED=`df | awk "/$OSCTMP/ { print \\$3 }" | tail -n 1`
 USED=`expr $USED + 16` # Some space for the status file
@@ -126,6 +126,8 @@ NOWUSED=`df | awk "/$OSCTMP/ { print \\$3 }" | tail -n 1`
 if [ `expr $NOWUSED - $USED` -gt 1024 ]; then
        echo "Space not all freed: now ${NOWUSED}kB, was ${USED}kB." 1>&2
 fi
 if [ `expr $NOWUSED - $USED` -gt 1024 ]; then
        echo "Space not all freed: now ${NOWUSED}kB, was ${USED}kB." 1>&2
 fi
+}
+run_test 1 "All Runtests"
 
 complete $SECONDS
 rm -f $FILES
 
 complete $SECONDS
 rm -f $FILES