Whamcloud - gitweb
LU-3846 test: Fix sanity test_56* with different layouts 79/7479/13
authorAndreas Dilger <andreas.dilger@intel.com>
Fri, 7 Jul 2017 16:51:17 +0000 (10:51 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Sun, 14 Jan 2018 02:36:55 +0000 (02:36 +0000)
commit8f39c90355f4d60698b4b59d7a49aa1a714282ac
tree3955ac6cbb38dde3794c7e66cc5626c17597dcfb
parent767f03b161ae44bd9d33dae7e03e71e73852813f
LU-3846 test: Fix sanity test_56* with different layouts

Fix a bug in "lfs getstripe --obd" and "lfs find --obd" where they
tried to access objects of uninitialized components to check if
they were on specified OSTs.  Those components have no objects, so
skip uninitialized components when searching for specific OSTs.

Sanity test_56s and test_56u will fail when the default stripe count
is not 1 and the test is run with more than one OST.  Explicitly
set stripe_count=1 for the default directory layout for these tests.

For PFL layout testing, test_56a needs to fix its output parsing, as
it is using this to verify that lfs getstripe is returning valid data
by counting occurrences of "obdidx" and not the new "l_ost_idx".

Do not delete the filesystem default striping in 56a, 56g, 56h, as
this will silently cause failures with default PFL layout testing.

The sanity test_56* subdirectories were allowed to be shared long ago,
but when $tdir became a per-subtest directory this was lost.  Allow
the subdirectories to be shared again, where possible, to avoid
duplicate setup of the test directory for each subtest if not needed.

Pass test directory explicitly to setup_56() and not via global $TDIR.

Clean up test_56* to better match modern test code style.

Test-Parameters: trivial mdscount=2 mdtcount=4 testlist=sanity
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I1bcdeb80fc6e39227a87365f823879db70eec652
Reviewed-on: https://review.whamcloud.com/7479
Tested-by: Jenkins
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
lustre/tests/sanity.sh
lustre/utils/liblustreapi.c