Whamcloud - gitweb
LU-7586 test: wait for remove in sanity-hsm test_406() 28/17828/2
authorJohn L. Hammond <john.hammond@intel.com>
Tue, 5 Jan 2016 20:28:00 +0000 (14:28 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 14 Jan 2016 03:59:37 +0000 (03:59 +0000)
In sanity-hsm test_406() wait for the remove to complete before
continuing and call 'lfs mv' with the parent directory instead of the
individual file.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Idc22747c3e9da35ca40671735f18889345af5d9d
Reviewed-on: http://review.whamcloud.com/17828
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/sanity-hsm.sh

index c580554..f12cb18 100755 (executable)
@@ -4640,13 +4640,13 @@ test_406() {
        $LFS hsm_restore $DIR/$tdir/$tfile
        wait_request_state "$fid" RESTORE SUCCEED
 
        $LFS hsm_restore $DIR/$tdir/$tfile
        wait_request_state "$fid" RESTORE SUCCEED
 
-       $LFS hsm_remove $DIR/$tdir/$tfile ||
-               error "cannot remove $DIR/$tdir/$tfile from archive"
+       $LFS hsm_remove $DIR/$tdir/$tfile
+       wait_request_state "$fid" REMOVE SUCCEED
 
        cat $DIR/$tdir/$tfile > /dev/null ||
                error "cannot read $DIR/$tdir/$tfile"
 
 
        cat $DIR/$tdir/$tfile > /dev/null ||
                error "cannot read $DIR/$tdir/$tfile"
 
-       $LFS mv -M1 $DIR/$tdir/$tfile ||
+       $LFS mv -M1 $DIR/$tdir ||
                error "cannot complete migration after HSM remove"
 
        mdt_index=$($LFS getstripe -M $DIR/$tdir)
                error "cannot complete migration after HSM remove"
 
        mdt_index=$($LFS getstripe -M $DIR/$tdir)