Whamcloud - gitweb
LU-2711 tests: conf-sanity clean up environment in test 03/30703/5
authorJames Nunez <james.a.nunez@intel.com>
Wed, 3 Jan 2018 22:16:34 +0000 (15:16 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 2 May 2018 02:23:15 +0000 (02:23 +0000)
Several Lustre test suites execute code or set variables
between tests even if the preceding test is not executed.
In the case of conf-sanity, the code between tests 23a and
23b and between 43b and 44 are there to clean up the environment
from the previous test. Properly clean up the file system
configuration/environment at the end of test 23a and 43b.

Test-Parameters: trivial testlist=conf-sanity

Signed-off-by: James Nunez <james.a.nunez@intel.com>
Change-Id: I250bb2067d0c966f866b404025dc6240b16f301e
Reviewed-on: https://review.whamcloud.com/30703
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Saurabh Tandan <saurabh.tandan@intel.com>
Reviewed-by: Wei Liu <wei3.liu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/conf-sanity.sh

index 06a82df..9b480e5 100644 (file)
@@ -893,14 +893,10 @@ test_23a() {      # was test_23
                "MOUNT_LUSTRE_PID $MOUNT_LUSTRE_PID still not killed in $WAIT secs"
                ps -ef | grep mount
        fi
-       stop_mds || error "stopping MDSes failed"
-       stop_ost || error "stopping OSSes failed"
+       cleanup || error "cleanup failed with rc $?"
 }
 run_test 23a "interrupt client during recovery mount delay"
 
-umount_client $MOUNT
-cleanup_nocli
-
 test_23b() {    # was test_23
        start_mds || error "MDS start failed"
        start_ost || error "Unable to start OST1"
@@ -3264,12 +3260,10 @@ test_43b() { # LU-5690
                --reformat $fs2mgsdev $fs2mgsvdev || error "add fs2mgs failed"
        start $fs2mgs $fs2mgsdev $MGS_MOUNT_OPTS  || error "start fs2mgs failed"
        stop $fs2mgs -f || error "stop fs2mgs failed"
+       cleanup || error "cleanup failed with $?"
 }
 run_test 43b "parse nosquash_nids with commas in expr_list"
 
-umount_client $MOUNT
-cleanup_nocli
-
 test_44() { # 16317
        setup
        check_mount || error "check_mount"