From b79a2cc8f2c72f35e38b93d3399fbf04fe6ad740 Mon Sep 17 00:00:00 2001 From: James Nunez Date: Wed, 3 Jan 2018 15:16:34 -0700 Subject: [PATCH] LU-2711 tests: conf-sanity clean up environment in test 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 Change-Id: I250bb2067d0c966f866b404025dc6240b16f301e Reviewed-on: https://review.whamcloud.com/30703 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Saurabh Tandan Reviewed-by: Wei Liu Reviewed-by: Oleg Drokin --- lustre/tests/conf-sanity.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index 06a82df..9b480e5 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -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" -- 1.8.3.1