Whamcloud - gitweb
land b_eq on HEAD
[fs/lustre-release.git] / lustre / tests / conf-sanity.sh
index 34ba231..9380a2d 100644 (file)
@@ -183,9 +183,10 @@ test_5() {
        # if all the modules have unloaded.
        umount $MOUNT &
        UMOUNT_PID=$!
-       sleep $TIMEOUT
+       sleep 2
        echo "killing umount"
        kill -TERM $UMOUNT_PID
+       echo "waiting for umount to finish"
        wait $UMOUNT_PID 
 
        # cleanup client modules
@@ -200,6 +201,48 @@ test_5() {
 }
 run_test 5 "force cleanup mds, then cleanup"
 
+test_5b() {
+       start_ost
+       start_mds
+       stop_mds
+
+       [ -d $MOUNT ] || mkdir -p $MOUNT
+       $LCONF --nosetup --node client_facet $XMLCONFIG > /dev/null 
+       llmount $mds_HOST://mds_svc/client_facet $MOUNT  && exit 1
+
+       # cleanup client modules
+       $LCONF --cleanup --nosetup --node client_facet $XMLCONFIG > /dev/null 
+       
+       # stop_mds is a no-op here, and should not fail
+       stop_mds || return 2
+       stop_ost || return 3
+
+       lsmod | grep -q portals && return 3
+       return 0
+
+}
+run_test 5b "mds down, cleanup after failed mount (bug 2712)"
+
+test_5c() {
+       start_ost
+       start_mds
+
+       [ -d $MOUNT ] || mkdir -p $MOUNT
+       $LCONF --nosetup --node client_facet $XMLCONFIG > /dev/null 
+       llmount $mds_HOST://wrong_mds_svc/client_facet $MOUNT  && exit 1
+
+       # cleanup client modules
+       $LCONF --cleanup --nosetup --node client_facet $XMLCONFIG > /dev/null 
+       
+       stop_mds || return 2
+       stop_ost || return 3
+
+       lsmod | grep -q portals && return 3
+       return 0
+
+}
+run_test 5c "cleanup after failed mount (bug 2712)"
+
 test_6() {
        setup
        manual_umount_client