From 27f65af06d0906856041cbcf2537cfabe2a90583 Mon Sep 17 00:00:00 2001 From: "John L. Hammond" Date: Fri, 19 Dec 2014 10:44:05 -0600 Subject: [PATCH] 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 --- lustre/tests/sanity-hsm.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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" } -- 1.8.3.1