Whamcloud - gitweb
LU-1952 tests: fix sanity test_51b on small MDTs
authorAndreas Dilger <adilger@whamcloud.com>
Sun, 16 Sep 2012 23:09:26 +0000 (17:09 -0600)
committerOleg Drokin <green@whamcloud.com>
Thu, 4 Oct 2012 18:58:59 +0000 (14:58 -0400)
commit9d45009ee59d62a55db405a21221677c89439dbf
treee73d9e7ccaeec5caf12788423e0b36e1f264b9cb
parent341b9af7cb1cf9214fa8c816498faca4b69714e3
LU-1952 tests: fix sanity test_51b on small MDTs

Running sanity.sh test_51b() fails when the MDT filesystem is 256MB,
because the filesystem can create fewer than 64k directories consume
at 4kB each, even if there are enough inodes.  The following
test_51bb() fails if NUMTEST is reduced in test_51b(), because this is
done inside the subshell, and does not get propagated to the next
test.

Add an additional check that there are enough free blocks in the
filesystem for creating subdirectories, or reduce the subdirectory
count appropriately.   Also, write the actual number of subdirectories
created into a temporary file in test_51b() and then read it back in
test_51bb() so that the test completes correctly.

Do some minor cleanup of test style to match current guidelines.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I36119be4006d8a1d2b5034045b075c81de500c1e
Reviewed-on: http://review.whamcloud.com/4005
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Wei Liu <wei3.liu@intel.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity.sh