diff options
author | Jeff Darcy <jdarcy@redhat.com> | 2015-05-04 17:49:16 -0400 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2015-05-04 17:05:58 -0700 |
commit | 80972fd5923b05f3bddd57c5b98dc5a53e9d1edf (patch) | |
tree | 50a50c1ea0b04ec9c1eccb1b4c58ac343c14edb2 /tests | |
parent | 0b14edfc6974161b25a11cd683d164aa337c6122 (diff) |
tests: fix failures due to not unmounting $M2 (/mnt/glusterfs/2)
Our failure to unmount meant that both mkdir and rmdir would fail in
cleanup(). Because one of those mkdirs was the last thing cleanup()
executed, it would fail, so the test would fail, so the entire
regression run would fail. The fix has two parts.
(1) Unmount the offending directory.
(2) Make sure cleanup() returns success even if that last mkdir
failed.
That might keep us from consistently blowing up regression runs on the
very first tests (basic/afr/data-self-heal.t) that we execute.
Change-Id: I7a9761bd28761a5ee2face3db8112e9c3f6c5dc8
BUG: 1163543
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/10536
Reviewed-by: Justin Clift <justin@gluster.org>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/include.rc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/include.rc b/tests/include.rc index 94e4bc4bb67..92c8c8a2763 100644 --- a/tests/include.rc +++ b/tests/include.rc @@ -461,6 +461,7 @@ function cleanup() umount $flag /tmp/mnt* 2>/dev/null umount $flag $M0 2>/dev/null || umount -f $M0 2>/dev/null || true; umount $flag $M1 2>/dev/null || umount -f $M1 2>/dev/null || true; + umount $flag $M2 2>/dev/null || umount -f $M2 2>/dev/null || true; umount $flag $N0 2>/dev/null || umount -f $N0 2>/dev/null || true; umount $flag $N1 2>/dev/null || umount -f $N1 2>/dev/null || true; @@ -484,6 +485,12 @@ function cleanup() return 1; fi >&2 mkdir -p $WORKDIRS + # This is usually the last thing a test script calls, so our return + # value becomes their exit value. While it's not great for the mkdir + # above to fail, promoting that into a failure of the whole test (and + # thus of an entire regression-test run) seems a bit excessive. Make + # sure we return good status anyway. + return 0 } function volinfo_field() |