Whamcloud - gitweb
LU-8911 tests: sanity-hsm test_24d fails on a local setup 85/24185/11
authorQuentin Bouget <quentin.bouget@cea.fr>
Tue, 6 Dec 2016 14:41:16 +0000 (15:41 +0100)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 1 Mar 2017 05:11:35 +0000 (05:11 +0000)
In test_24d, do not use the default mountpoint of copytool_setup()
as it is also the one the test mounts in read-only mode.

This patch also removes:
 - the "continuing fast path" in copytool_setup (calling
   "pkill -CONT -x lhsmtool_posix" instead of launching a new
   copytool) as it is not explicitly used by any test
 - as well as the first copytool_setup located outside of any
   tests.

Test-Parameters: trivial testlist=sanity-hsm
Signed-off-by: Quentin Bouget <quentin.bouget@cea.fr>
Change-Id: I86bc41213bc656d7a83d63fb8e9bc595ba6b73ca
Reviewed-on: https://review.whamcloud.com/24185
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/sanity-hsm.sh

index 785da68..49a9037 100755 (executable)
@@ -258,12 +258,6 @@ copytool_setup() {
 
        local agent=$(facet_active_host $facet)
 
-       if [[ -z "$arc_id" ]] &&
-               do_facet $facet "pkill -CONT -x $HSMTOOL_BASE"; then
-                       echo "Only wakeup running copytool $facet on $agent"
-                       return 0
-       fi
-
        if $HSM_ARCHIVE_PURGE; then
                echo "Purging archive on $agent"
                do_facet $facet "rm -rf $hsm_root/$HSMTMP/*"
@@ -851,9 +845,6 @@ echo "Set HSM on and start"
 cdt_set_mount_state enabled
 cdt_check_state enabled
 
-echo "Start copytool"
-copytool_setup
-
 echo "Set sanity-hsm HSM policy"
 cdt_set_sanity_policy
 
@@ -900,6 +891,8 @@ test_1a() {
        local f=$DIR/$tdir/$tfile
        local fid=$(make_small $f)
 
+       copytool_setup
+
        $LFS hsm_archive $f || error "could not archive file"
        wait_request_state $fid ARCHIVE SUCCEED
 
@@ -909,6 +902,8 @@ test_1a() {
        check_hsm_flags $f "0x0000000d"
 
        $MMAP_CAT $f > /dev/null || error "failed mmap & cat release file"
+
+       copytool_cleanup
 }
 run_test 1a "mmap & cat a HSM released file"
 
@@ -2137,6 +2132,7 @@ run_test 24c "check that user,group,other request masks work"
 cleanup_test_24d() {
        trap 0
        mount -o remount,rw $MOUNT2
+       zconf_umount $(facet_host $SINGLEAGT) "$MOUNT3"
 }
 
 test_24d() {
@@ -2145,13 +2141,15 @@ test_24d() {
        local fid1
        local fid2
 
-       copytool_setup
-
        mkdir -p $DIR/$tdir
        rm -f $file1
        fid1=$(make_small $file1)
 
        trap cleanup_test_24d EXIT
+       zconf_mount $(facet_host $SINGLEAGT) "$MOUNT3" ||
+               error "cannot mount '$MOUNT3' on '$SINGLEAGT'"
+       copytool_setup $SINGLEAGT "$MOUNT3" ||
+               error "unable to setup a copytool for the test"
 
        mount -o remount,ro $MOUNT2