Whamcloud - gitweb
LU-6406 tests: fix undersized fsname and FID strings 13/14213/5
authorFrank Zago <fzago@cray.com>
Thu, 26 Mar 2015 23:42:25 +0000 (18:42 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 11 May 2015 11:30:27 +0000 (11:30 +0000)
commitfe2356bf5f9da5fe5800e7ec014e81f52e787dce
tree988b4456065f83fd41183562ac4f745348ab5884
parent4c3858b3c88d2a2f443d348945229f5995f3e1dd
LU-6406 tests: fix undersized fsname and FID strings

A Lustre filesystem name is up to 8 characters, plus 1 for the NUL
terminator. If a filesystem name is 8 characters, then the
llapi_layout_test, llapi_hsm_test, group_lock_test and llapi_fid_test
may have their stack scribbled or overran when they call
llapi_search_mounts(). Add one extra byte for the NUL character.

Same issue with a FID string, which also needs an extra character for
NUL termination.

Signed-off-by: frank zago <fzago@cray.com>
Change-Id: Ic7757ebce051e12f4723e27b5b00d4db1637b384
Reviewed-on: http://review.whamcloud.com/14213
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/lod/lod_object.c
lustre/tests/llapi_fid_test.c
lustre/tests/llapi_hsm_test.c
lustre/tests/llapi_layout_test.c