Whamcloud - gitweb
LU-11636 tests: fix test_mkdir() to work with old severs 11/33611/11
authorElena Gryaznova <c17455@cray.com>
Mon, 11 Feb 2019 13:52:35 +0000 (16:52 +0300)
committerOleg Drokin <green@whamcloud.com>
Mon, 8 Apr 2019 05:35:11 +0000 (05:35 +0000)
commit07b271c0972757772a129e9a6370dbb163f16a06
tree45e9adabf2595215375591a71fb864df4aeea704
parent1ba794f6ec9e7ce7ad65fd74f170089fffc31d91
LU-11636 tests: fix test_mkdir() to work with old severs

Patch fixes the following test_mkdir() defects:
- test_mkdir() always creates striped dir, this breaks interop
  testing with non DNEII servers. For old servers stripe count
  is supposed to be set to 1. The tests which call
  test_mkdir() -c <value>, where <value> is greater than 1 should
  take care about interop with old servers and be skipped for
  such servers.
- test_mkdir() creates the striped dir with -c2 only, this limits
  the testing on MDSCOUNT > 2 config.
Patch adds the possibilities:
- to specify the exact stripe count if DIRSTRIPE_COUNT set;
  default is random and does not depend on the test number now.
- to specify the exact stripe index if DIRSTRIPE_INDEX set;
  default is not changed (random).
- set stripe count to 1 for servers without DNE2 (< 2.8.0).

Patch moves get_lustre_env call (added by LU-11607) from sanity.sh,
conf-sanity.sh and sanity-quota.sh to init_logging(). This allows
$MDS1_VERSION to be used in test_mkdir() instead of having to add
get_lustre_env() to every test script test_mkdir() is used in.

Patch does fix sanity 120a(), 120f() to operate with predictable
MDT index. We did not see this failure before test_mkdir()
improvements because tests were never run with mdt_index other
than equal to 0: the randomization
  mdt_index=$((test_num % MDSCOUNT))
  had set mdt_index equal to 0 for MDSCOUNT {1..6} for these tests.

Patch fixes sanity-scrub.sh:scrub_prep() to create $nfiles on mds$n
and sanity-scrub.sh:test_11() to create $CREATED files on each mds.

Signed-off-by: Elena Gryaznova <c17455@cray.com>
Cray-bug-id: LUS-6434, LUS-5500, LUS-6697
Reviewed-by: Vladimir Saveliev <c17830@cray.com>
Reviewed-by: Alexander Boyko <c17825@cray.com>
Change-Id: I3e6362a0b7c1d3987a289e492c8e9ad090f394d4
Reviewed-on: https://review.whamcloud.com/33611
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/conf-sanity.sh
lustre/tests/sanity-hsm.sh
lustre/tests/sanity-quota.sh
lustre/tests/sanity-scrub.sh
lustre/tests/sanity.sh
lustre/tests/test-framework.sh