Whamcloud - gitweb
LU-10234 tests: use wait correctly in sanity-hsm test_3[4-6] 02/30102/4
authorQuentin Bouget <quentin.bouget@cea.fr>
Wed, 15 Nov 2017 15:41:53 +0000 (15:41 +0000)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 22 Nov 2017 03:56:26 +0000 (03:56 +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>
lustre/tests/sanity-hsm.sh

index 85224e0..7ea4766 100755 (executable)
@@ -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
 }