From eec4b8985f5eaacd13f0e0db7328dcdd610655bc Mon Sep 17 00:00:00 2001 From: Quentin Bouget Date: Wed, 15 Nov 2017 15:41:53 +0000 Subject: [PATCH] LU-10234 tests: use wait correctly in sanity-hsm test_3[4-6] Test 34, 35 and 36 did not properly check the return code of wait and potentially missed regressions. Test-Parameters: trivial testlist=sanity-hsm Signed-off-by: Quentin Bouget Change-Id: I21e8b16b55b946a8e5837549c3a3698379132e48 Reviewed-on: https://review.whamcloud.com/30102 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Dominique Martinet Reviewed-by: Henri Doreau Reviewed-by: James Nunez Reviewed-by: Ben Evans Reviewed-by: Oleg Drokin --- lustre/tests/sanity-hsm.sh | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lustre/tests/sanity-hsm.sh b/lustre/tests/sanity-hsm.sh index 85224e0..7ea4766 100755 --- a/lustre/tests/sanity-hsm.sh +++ b/lustre/tests/sanity-hsm.sh @@ -3069,8 +3069,7 @@ test_34() { local there=$(ps -o pid,comm hp $pid >/dev/null) [[ -z $there ]] || error "Restore initiator does not exit" - local rc=$(wait $pid) - [[ $rc -eq 0 ]] || error "Restore initiator failed with $rc" + wait $pid || error "Restore initiator failed with $?" copytool_cleanup } @@ -3106,8 +3105,7 @@ test_35() { local there=$(ps -o pid,comm hp $pid >/dev/null) [[ -z $there ]] || error "Restore initiator does not exit" - local rc=$(wait $pid) - [[ $rc -eq 0 ]] || error "Restore initiator failed with $rc" + wait $pid || error "Restore initiator failed with $?" fid2=$(path2fid $f) [[ $fid2 == $fid1 ]] || error "Wrong fid after mv $fid2 != $fid1" @@ -3145,9 +3143,7 @@ test_36() { [[ -z $there ]] || error "Restore initiator does not exit" - local rc=$(wait $pid) - [[ $rc -eq 0 ]] || - error "Restore initiator failed with $rc" + wait $pid || error "Restore initiator failed with $?" copytool_cleanup } -- 1.8.3.1