Whamcloud - gitweb
Branch b1_8
authorjohann <johann>
Fri, 19 Jun 2009 12:21:30 +0000 (12:21 +0000)
committerjohann <johann>
Fri, 19 Jun 2009 12:21:30 +0000 (12:21 +0000)
b=19913
i=grev
i=bobijam

Add support remote ost in test 151.

lustre/tests/sanity.sh

index ccdc288..c58e462 100644 (file)
@@ -5748,35 +5748,38 @@ test_150() {
 run_test 150 "truncate/append tests"
 
 function roc_access() {
-       ACCNUM=`$LCTL get_param -n obdfilter.*.stats | \
+       local list=$(comma_list $(osts_nodes))
+       ACCNUM=`do_nodes $list $LCTL get_param -n obdfilter.*.stats | \
                grep 'cache_access' | awk '{print $2}' | \
                awk '{sum=sum+$3} END{print sum}'`
        echo $ACCNUM
 }
 
 function roc_hit() {
-       ACCNUM=`$LCTL get_param -n obdfilter.*.stats | \
+       local list=$(comma_list $(osts_nodes))
+       ACCNUM=`do_nodes $list $LCTL get_param -n obdfilter.*.stats | \
                grep 'cache_hit' | awk '{print $2}' | \
                awk '{sum=sum+$1} END{print sum}'`
        echo $ACCNUM
 }
 
 test_151() {
-       if ! grep -q truncate_inode_pages_range /proc/kallsyms; then  #b=18718
+       local list=$(comma_list $(osts_nodes))
+       if ! do_nodes $list grep -q truncate_inode_pages_range /proc/kallsyms; then  #b=18718
                skip "old RHEL4/SLES9 kernel" && return
        fi
 
        local CPAGES=3
 
        # check whether obdfilter is cache capable at all
-       if ! $LCTL get_param -n obdfilter.*.read_cache_enable > /dev/null; then
+       if ! do_nodes $list $LCTL get_param -n obdfilter.*.read_cache_enable > /dev/null; then
                echo "not cache-capable obdfilter"
                return 0
        fi
 
        # make sure cache is enabled on all obdfilters
-       $LCTL set_param obdfilter.*.read_cache_enable=1
-       $LCTL set_param obdfilter.*.writethrough_cache_enable=1
+       do_nodes $list $LCTL set_param obdfilter.*.read_cache_enable=1
+       do_nodes $list $LCTL set_param obdfilter.*.writethrough_cache_enable=1
 
        # pages should be in the case right after write
        dd if=/dev/urandom of=$DIR/$tfile bs=4k count=$CPAGES || error "dd failed"
@@ -5790,7 +5793,7 @@ test_151() {
 
        # the following read invalidates the cache
        cancel_lru_locks osc
-       $LCTL set_param -n obdfilter.*.read_cache_enable 0
+       do_nodes $list $LCTL set_param -n obdfilter.*.read_cache_enable 0
        cat $DIR/$tfile >/dev/null
 
        # now data shouldn't be found in the cache
@@ -5802,8 +5805,8 @@ test_151() {
                error "IN CACHE: before: $BEFORE, after: $AFTER"
        fi
 
-       $LCTL set_param -n obdfilter.*.read_cache_enable=1
-       $LCTL set_param obdfilter.*.writethrough_cache_enable=1
+       do_nodes $list $LCTL set_param -n obdfilter.*.read_cache_enable=1
+       do_nodes $list $LCTL set_param obdfilter.*.writethrough_cache_enable=1
        rm -f $DIR/$tfile
 }
 run_test 151 "test cache on oss and controls ==============================="