Whamcloud - gitweb
LU-4864 tests: cleanup shared files in sanity-hsm 73/10073/4
authorMinh Diep <minh.diep@intel.com>
Thu, 24 Apr 2014 02:28:35 +0000 (19:28 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 6 May 2014 03:30:29 +0000 (03:30 +0000)
Test creates shared files need to remove them completely

Signed-off-by: Minh Diep <minh.diep@intel.com>
Change-Id: Ib949326f18ddd3a508fd8605e16f3cafb5a9ee4d
Reviewed-on: http://review.whamcloud.com/10073
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/sanity-hsm.sh

index 67f260e..587aeaf 100755 (executable)
@@ -257,11 +257,13 @@ get_copytool_event_log() {
 
 copytool_cleanup() {
        trap - EXIT
-       local agents=${1:-$(facet_active_host $SINGLEAGT)}
+       local facet=$SINGLEAGT
+       local agents=${1:-$(facet_active_host $facet)}
        local mdtno
        local idx
        local oldstate
        local mdt_hsmctrl
+       local hsm_root=$(copytool_device $facet)
 
        do_nodesv $agents "pkill -INT -x $HSMTOOL_BASE" || return 0
        sleep 1
@@ -286,6 +288,7 @@ copytool_cleanup() {
                        "$oldstate" 20 ||
                        error "mds${mdtno} cdt state is not $oldstate"
        done
+       do_facet $facet "rm -rf $hsm_root"
 }
 
 copytool_suspend() {