Whamcloud - gitweb
b=23706 sles11sp1: jbd2 stat patch is missing
authorDmitry Zogin <dmitry.zoguine@oracle.com>
Fri, 24 Sep 2010 19:05:47 +0000 (15:05 -0400)
committerAndrew Perepechko <andrew.perepechko@sun.com>
Mon, 27 Sep 2010 15:50:07 +0000 (19:50 +0400)
 Temp patch to disable obdfilter-survey.sh 1b/2b tests,
 if jbd stats are not available.

 i=grev

lustre/tests/obdfilter-survey.sh
lustre/tests/test-framework.sh

index 1043db9..7adc4b9 100644 (file)
@@ -129,6 +129,10 @@ check_jbd_values_facets () {
 }
 
 test_1b () {
+       local major=$(get_mds_kernel_major)
+       local minor=$(get_mds_kernel_minor)
+       [ "$major"=="2.6" -a $minor -eq 32 ]  && \
+               skip "There is no jbd history in this kernel version." && return
        local param_file=$TMP/$tfile-params
 
        do_nodesv $(comma_list $(osts_nodes)) lctl get_param obdfilter.${FSNAME}-*.sync_journal
@@ -153,6 +157,10 @@ test_2a () {
 run_test 2a "Stripe F/S over the Network"
 
 test_2b () {
+       local major=$(get_mds_kernel_major)
+       local minor=$(get_mds_kernel_minor)
+       [ "$major"=="2.6" -a $minor -eq 32 ]  && \
+               skip "There is no jbd history in this kernel version." && return
        local param_file=$TMP/$tfile-params
 
        do_nodesv $(comma_list $(osts_nodes)) lctl get_param obdfilter.${FSNAME}-*.sync_journal
index 53d84c1..987a4ff 100644 (file)
@@ -3132,6 +3132,21 @@ get_mds_version_fix () {
     echo $version | awk -F. '{print $4}'
 }
 
+get_kernel_version () {
+    local facet=${1:-"mds"}
+    do_facet $facet uname -r | awk -F "-" '{print $1}'
+}
+
+get_mds_kernel_major () {
+    local version=$(get_kernel_version mds)
+    echo $version | awk -F. '{print $1"."$2}'
+}
+
+get_mds_kernel_minor () {
+    local version=$(get_kernel_version mds)
+    echo $version | awk -F. '{print $3}'
+}
+
 get_mds_fsstat_proc_path() {
     local major=$(get_mds_version_major)
     local minor=$(get_mds_version_minor)