Whamcloud - gitweb
LU-11185 mgc: config lock leak
[fs/lustre-release.git] / lustre / tests / sanity.sh
index 0f68ae6..027271c 100644 (file)
@@ -51,8 +51,8 @@ fi
 
 selinux_status=$(getenforce)
 if [ "$selinux_status" != "Disabled" ]; then
-       # bug number:    LU-12469 LU-12469
-       ALWAYS_EXCEPT+=" 230b     230d"
+       # bug number:
+       ALWAYS_EXCEPT+=""
 fi
 
 # skip the grant tests for ARM until they are fixed
@@ -22718,6 +22718,31 @@ test_900() {
 }
 run_test 900 "umount should not race with any mgc requeue thread"
 
+# LUS-6253/LU-11185
+test_901() {
+       local oldc
+       local newc
+       local olds
+       local news
+       [ $PARALLEL == "yes" ] && skip "skip parallel run"
+
+       # some get_param have a bug to handle dot in param name
+       cancel_lru_locks MGC
+       oldc=$($LCTL get_param -n 'ldlm.namespaces.MGC*.lock_count')
+       olds=$(do_facet mgs $LCTL get_param -n 'ldlm.namespaces.MGS*.lock_count')
+       umount_client $MOUNT || error "umount failed"
+       mount_client $MOUNT || error "mount failed"
+       cancel_lru_locks MGC
+       newc=$($LCTL get_param -n 'ldlm.namespaces.MGC*.lock_count')
+       news=$(do_facet mgs $LCTL get_param -n 'ldlm.namespaces.MGS*.lock_count')
+
+       [ $oldc -lt $newc ] && error "mgc lock leak ($oldc != $newc)"
+       [ $olds -lt $news ] && error "mgs lock leak ($olds != $news)"
+
+       return 0
+}
+run_test 901 "don't leak a mgc lock on client umount"
+
 complete $SECONDS
 [ -f $EXT2_DEV ] && rm $EXT2_DEV || true
 check_and_cleanup_lustre