Whamcloud - gitweb
LU-10234 tests: use wait correctly in sanity-hsm test_3[4-6] 08/30208/2
authorQuentin Bouget <quentin.bouget@cea.fr>
Wed, 15 Nov 2017 15:41:53 +0000 (15:41 +0000)
committerJohn L. Hammond <john.hammond@intel.com>
Mon, 27 Nov 2017 15:13:38 +0000 (15:13 +0000)
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 <quentin.bouget@cea.fr>
Change-Id: I21e8b16b55b946a8e5837549c3a3698379132e48
Reviewed-on: https://review.whamcloud.com/30102
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dominique Martinet <dominique.martinet@cea.fr>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
(cherry picked from commit eec4b8985f5eaacd13f0e0db7328dcdd610655bc)
Reviewed-on: https://review.whamcloud.com/30208
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/tests/sanity-hsm.sh

index ddef7ab..20e472f 100755 (executable)
@@ -3075,8 +3075,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
 }
@@ -3112,8 +3111,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"
@@ -3151,9 +3149,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
 }