Whamcloud - gitweb
LU-11196 tests: clean up after conf-sanity test_101 68/33268/4
authorAndreas Dilger <adilger@whamcloud.com>
Tue, 2 Oct 2018 20:27:09 +0000 (14:27 -0600)
committerOleg Drokin <green@whamcloud.com>
Fri, 12 Oct 2018 18:24:34 +0000 (18:24 +0000)
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 <adilger@whamcloud.com>
Change-Id: I1167339d03340e1cc545d2855c4b32eef18cab07
Reviewed-on: https://review.whamcloud.com/33268
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/conf-sanity.sh

index c2f9c8f..394fe54 100644 (file)
@@ -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"