Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / tests / test-framework.sh
index a0f0320..5769f4b 100644 (file)
@@ -498,7 +498,7 @@ facet_failover() {
     wait_for $facet
     local dev=${facet}_dev
     local opt=${facet}_opt
-    start $facet ${!dev} ${!opt}
+    start $facet ${!dev} ${!opt} || error "Restart of $facet failed"
 }
 
 obd_name() {
@@ -1056,3 +1056,15 @@ canonical_path() {
     (cd `dirname $1`; echo $PWD/`basename $1`)
 }
 
+########################
+# helper functions
+
+osc_to_ost()
+{
+    osc=$1
+    ost=`echo $1 | awk -F_ '{print $3}'`
+    if [ -z $ost ]; then
+        ost=`echo $1 | sed 's/-osc.*//'`
+    fi
+    echo $ost
+}