From ed44caee9af0eeb32bce7e7de5f5146fa6dc1d00 Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Tue, 2 Oct 2018 14:27:09 -0600 Subject: [PATCH] LU-11196 tests: clean up after conf-sanity test_101 conf-sanity test_101() creates up to 50000 files in the top-level test directory, which can sometimes cause the later test_103() setup to fail, because "rm -rf" fails with "Argument list too long" when trying to clean up the test directory. Create the test_101 files in a subdirectory for cleanliness, and remove them at the end of the test so that we don't run out of space. Test-Parameters: trivial testlist=conf-sanity Signed-off-by: Andreas Dilger Change-Id: I1167339d03340e1cc545d2855c4b32eef18cab07 Reviewed-on: https://review.whamcloud.com/33268 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: James Nunez Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin --- lustre/tests/conf-sanity.sh | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index c2f9c8f2..394fe54 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -7288,12 +7288,13 @@ test_100() { run_test 100 "check lshowmount lists MGS, MDT, OST and 0@lo" test_101() { - local createmany_oid + local createmany_pid local dev=$FSNAME-OST0000-osc-MDT0000 setup - createmany -o $DIR1/$tfile-%d 50000 & - createmany_oid=$! + mkdir $DIR1/$tdir + createmany -o $DIR1/$tdir/$tfile-%d 50000 & + createmany_pid=$! # MDT->OST reconnection causes MDT<->OST last_id synchornisation # via osp_precreate_cleanup_orphans. for ((i = 0; i < 100; i++)); do @@ -7303,12 +7304,14 @@ test_101() { done ls -asl $MOUNT | grep '???' && - (kill -9 $createmany_oid &>/dev/null; \ - error "File hasn't object on OST") + { kill -9 $createmany_pid &>/dev/null; + error "File has no object on OST"; } - kill -s 0 $createmany_oid || break + kill -s 0 $createmany_pid || break done - wait $createmany_oid + wait $createmany_pid + + unlinkmany $DIR1/$tdir/$tfile-%d 50000 cleanup } run_test 101 "Race MDT->OST reconnection with create" -- 1.8.3.1