Whamcloud - gitweb
LU-683: handle short write in cl_io_commit_write
[fs/lustre-release.git] / lustre / tests / obdfilter-survey.sh
index 4719517..1e1284b 100644 (file)
@@ -5,6 +5,7 @@ set -e
 LUSTRE=${LUSTRE:-`dirname $0`/..}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
+init_logging
 
 nobjhi=${nobjhi:-1}
 thrhi=${thrhi:-16}
@@ -25,10 +26,6 @@ OBDSURVEY=${OBDSURVEY:-$(which obdfilter-survey)}
 build_test_filter
 check_and_setup_lustre
 
-min_ost_size () {
-    $LCTL get_param -n osc.*.kbytesavail | sort -n | head -n1
-}
-
 # FIXME: the summary file a bit smaller than OSTSIZE, add estimation
 minsize=$(min_ost_size)
 if [ $(( size * 1024 )) -ge $minsize  ]; then
@@ -88,7 +85,7 @@ print_jbd () {
        local file=$1
        local facet=$2
        local varsvc=${facet}_svc
-       local dev=$(basename $(do_facet $facet lctl get_param -n *.${!varsvc}.mntdev))
+       local dev=$(ldiskfs_canon "*.${!varsvc}.mntdev" $facet)
 
        # ext4: /proc/fs/jbd2/sda1:8/history 
        # ext3: /proc/fs/jbd/sdb1/history
@@ -187,7 +184,7 @@ test_3a () {
 }
 run_test 3a "Network survey"
 
-equals_msg `basename $0`: test complete, cleaning up
+complete $(basename $0) $SECONDS
 cleanup_echo_devs
 check_and_cleanup_lustre
-[ -f "$TESTSUITELOG" ] && cat $TESTSUITELOG && grep -q FAIL $TESTSUITELOG && exit 1 || true
+exit_status