Whamcloud - gitweb
LU-7273 tests: dump stacks upon CT stop failure
[fs/lustre-release.git] / lustre / tests / sanity-hsm.sh
index c580554..c9704e7 100755 (executable)
@@ -172,6 +172,10 @@ wait_copytools() {
                echo "copytools still running on $hosts"
        done
 
+       # try to dump Copytool's stack
+       do_nodesv $hosts "echo 1 >/proc/sys/kernel/sysrq ; " \
+                        "echo t >/proc/sysrq-trigger"
+
        echo "copytools failed to stop in ${wait_timeout}s"
 
        return 1
@@ -4640,13 +4644,13 @@ test_406() {
        $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"
 
-       $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)