[Bugs] [Bug 1252374] tests: no cleanup on receiving external signals INT, TERM and HUP

bugzilla at redhat.com bugzilla at redhat.com
Thu Aug 13 19:16:46 UTC 2015


https://bugzilla.redhat.com/show_bug.cgi?id=1252374



--- Comment #2 from Anand Avati <aavati at redhat.com> ---
COMMIT: http://review.gluster.org/11882 committed in master by Raghavendra
Talur (rtalur at redhat.com) 
------
commit db4e3a371c66c400b3cb95d4e7701625bef4ac95
Author: Prasanna Kumar Kalever <prasanna.kalever at redhat.com>
Date:   Tue Aug 11 13:45:26 2015 +0530

    tests: call cleanup on receiving external signals INT, TERM and HUP

    problem:
    when executing testcases manually, some time we may want to terminate the
    testcase execution in between due to various reasons.
    Existing testcase flow has no mechanism to call cleanup before they
terminate
    abnormally, hence we endup with volume setups and mount points uncleaned.

    Solution:
    This patch traps such kind of abnormal terminations and calls 'cleanup'
    function soon after they are caught and then terminates the testcases
    with appropriate status..

    $ ./tests/basic/mount-nfs-auth.t
    1..87
    =========================
    TEST 1 (line 8): glusterd
    ok 1
    RESULT 1: 0
    =========================
    TEST 2 (line 9): pidof glusterd
    ok 2
    RESULT 2: 0
    =========================
    TEST 3 (line 10): gluster -mode=script --wignore volume info
    No volumes present
    ok 3
    RESULT 3: 0
    ^C
    received external signal --INT--, calling 'cleanup' ...

    $ glusterd && gluster vol status
    No volumes present

    Change-Id: Ia51a850c356e599b8b789cec22b9bb5e87e1548a
    BUG: 1252374
    Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever at redhat.com>
    Reviewed-on: http://review.gluster.org/11882
    Reviewed-by: Niels de Vos <ndevos at redhat.com>
    Tested-by: NetBSD Build System <jenkins at build.gluster.org>
    Reviewed-by: Raghavendra Talur <rtalur at redhat.com>

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=wwkmx1vaW6&a=cc_unsubscribe


More information about the Bugs mailing list