Whamcloud - gitweb
LU-4178 tests: Wait requests to reach CDT before Cancel 73/13173/2
authorBruno Faccini <bruno.faccini@intel.com>
Tue, 23 Dec 2014 10:28:59 +0000 (11:28 +0100)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 6 Oct 2015 01:56:51 +0000 (01:56 +0000)
sanity-hsm/test_[200-202] sometimes fail because the Cancel
reaches the CDT before the operation it targets.
This patch verifies the operation has already been registered
at CDT before to send the Cancel.

Signed-off-by: Bruno Faccini <bruno.faccini@intel.com>
Change-Id: Ic6299a2fdb6b6a358a0ce6ecd5a17a8cf9839c87
Reviewed-on: http://review.whamcloud.com/13173
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: jacques-Charles Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/sanity-hsm.sh

index 721cb2c..b8ae8da 100755 (executable)
@@ -3777,6 +3777,8 @@ test_200() {
        # test with cdt on is made in test_221
        cdt_disable
        $LFS hsm_archive --archive $HSM_ARCHIVE_NUMBER $f
+       # wait archive to register at CDT
+       wait_request_state $fid ARCHIVE WAITING
        $LFS hsm_cancel $f
        cdt_enable
        wait_request_state $fid ARCHIVE CANCELED
@@ -3799,6 +3801,8 @@ test_201() {
        # test with cdt on is made in test_222
        cdt_disable
        $LFS hsm_restore $f
+       # wait restore to register at CDT
+       wait_request_state $fid RESTORE WAITING
        $LFS hsm_cancel $f
        cdt_enable
        wait_request_state $fid RESTORE CANCELED
@@ -3823,6 +3827,8 @@ test_202() {
 
        cdt_disable
        $LFS hsm_remove $f
+       # wait remove to register at CDT
+       wait_request_state $fid REMOVE WAITING
        $LFS hsm_cancel $f
        cdt_enable
        wait_request_state $fid REMOVE CANCELED