Whamcloud - gitweb
LU-6205 tests: fix bash expansion of fid 18/13618/5
authorFrank Zago <fzago@cray.com>
Tue, 3 Feb 2015 20:27:54 +0000 (14:27 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 18 Mar 2015 11:18:59 +0000 (11:18 +0000)
commitfd3bfcd73ee93e356adb716b11feca4bfd860af4
tree1384910eca37b0a05d6d946ef016214b89e26163
parente536e511c9e634d8cb7faf763ecab4cab5f40267
LU-6205 tests: fix bash expansion of fid

When calling lfs path2fid, the FID is returned between bracket. When
that fid variable is used, it may be expanded by the shell to
something else. For instance:

  $ touch x
  $ ../utils/lfs fid2path lustre [0x200000be7:0xb:0x0]
  bad FID format [x], should be [0x1:0x2:0x0]

  fid2path: error on FID x: Invalid argument

This will cause some tests, like 154A or 238, to sometimes fail.

Use quotes where the FIDs are used.

Replace "$(lfs ..." with "$($LFS ..." and made a couple variables
local.

Signed-off-by: frank zago <fzago@cray.com>
Change-Id: I3c1a34585ebaa596d66063f5ada3ccfc4d202ade
Reviewed-on: http://review.whamcloud.com/13618
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
lustre/tests/sanity.sh