From: John L. Hammond Date: Fri, 19 Dec 2014 16:44:05 +0000 (-0600) Subject: LU-6055 hsm: improve error handling in sanity-hsm X-Git-Tag: 2.6.92~24 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=27f65af06d0906856041cbcf2537cfabe2a90583;hp=da5773e2b498a4edacc26fbf610d0b7628818d93 LU-6055 hsm: improve error handling in sanity-hsm In path2fid() propagate errors from 'lfs path2fid'. In file_creation_failure() redirect the output of df to stderr so that it is not captured by command substitution. Signed-off-by: John L. Hammond Change-Id: I7fabf46af4aa36c6affef45cf8c9b044a7aa29dd Reviewed-on: http://review.whamcloud.com/13154 Tested-by: Jenkins Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Tested-by: Maloo --- diff --git a/lustre/tests/sanity-hsm.sh b/lustre/tests/sanity-hsm.sh index f87ef93..64f5376 100755 --- a/lustre/tests/sanity-hsm.sh +++ b/lustre/tests/sanity-hsm.sh @@ -511,6 +511,7 @@ needclients() { path2fid() { $LFS path2fid $1 | tr -d '[]' + return ${PIPESTATUS[0]} } get_hsm_flags() { @@ -561,7 +562,7 @@ file_creation_failure() { local f=$2 local err=$3 - df $MOUNT $MOUNT2 + df $MOUNT $MOUNT2 >&2 error "cannot create $f with $cmd, status=$err" }