Whamcloud - gitweb
LU-9186 tests: fix sanityn test_76 and related code
Fix sanityn.sh test_76 to skip already open files when checking
whether mdt.*.exports.*.open_files accurately lists open files.
Otherwise, if some previous test leaves a file descriptor open
it will cause this test to fail spuriously.
Limit the number of open files to 256*MDSCOUNT rather than 2048,
so the test runs faster (80s vs. 215s in my VM with 2 MDTs).
Properly close the open shell FDs using "FD<&-" rather than
redirecting them to /dev/null, otherwise they stay open forever.
Print a '.' only once per 32 files opened/closed.
List open files in *.open_files in the order they were opened,
rather than reverse order, since this makes it easier to see which
files have been open longer.
Print out the pathname of the open files being skipped.
Don't explicitly mount $MOUNT2 in sanityn.sh. This is already
handled inside check_and_setup_lustre() at the start of sanityn.sh.
Improve free_fd() to accept a "last_fd" argument to avoid searching
all open FDs on each call if it is known the fds are not closing.
Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I274b6db96f49a52c086f836c005558ef4b3ebbe5
Reviewed-on: https://review.whamcloud.com/25847
Tested-by: Jenkins
Reviewed-by: Jian Yu <jian.yu@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Ashish Purkar <ashish.purkar@seagate.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>