Whamcloud - gitweb
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>