Whamcloud - gitweb
LU-1745 test: Fix recovery-small test 105
authorJames Simmons <uja.ornl@gmail.com>
Wed, 15 Aug 2012 18:00:05 +0000 (14:00 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 17 Aug 2012 15:04:14 +0000 (11:04 -0400)
Update check_target_ir_state() to handle the old IR reported
state of ON/OFF as well as the new reported state of DISABLED/
ENABLED.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Ib2e10594cd2fb5d2e54d22187db32af9229e27ff
Reviewed-on: http://review.whamcloud.com/3667
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/recovery-small.sh

index c89558a..02b500a 100755 (executable)
@@ -1189,8 +1189,8 @@ check_target_ir_state()
 
         st=$(do_facet $target "lctl get_param -n $recovery_proc |
                                awk '/IR:/{ print \\\$2}'")
 
         st=$(do_facet $target "lctl get_param -n $recovery_proc |
                                awk '/IR:/{ print \\\$2}'")
-        [ $st != ON -o $st != OFF ] ||
-                error "Error state $st, must be ON or OFF"
+       [ $st != ON -o $st != OFF -o $st != ENABLED -o $st != DISABLED ] ||
+               error "Error state $st, must be ENABLED or DISABLED"
         echo -n $st
 }
 
         echo -n $st
 }
 
@@ -1455,7 +1455,8 @@ test_105()
 
         # make sure lustre mount at $rcli disabling IR
         local ir_state=$(check_cli_ir_state $rcli)
 
         # make sure lustre mount at $rcli disabling IR
         local ir_state=$(check_cli_ir_state $rcli)
-       [ $ir_state = DISABLED -o $ir_state = "OFF" ] || error "IR state must be DISABLED at $rcli"
+       [ $ir_state = "DISABLED" -o $ir_state = "OFF" ] ||
+               error "IR state must be DISABLED at $rcli"
 
        # Since the client just mounted, its last_rcvd entry is not on disk.
        # Send an RPC so exp_need_sync forces last_rcvd to commit this export
 
        # Since the client just mounted, its last_rcvd entry is not on disk.
        # Send an RPC so exp_need_sync forces last_rcvd to commit this export