From 48b93c292c0069da9ac2fe77e66d08a1cdeacfdc Mon Sep 17 00:00:00 2001 From: ShyamsundarR Date: Sat, 11 Aug 2018 13:21:36 -0400 Subject: tests: Fix cleanup routine for some mux tests Some of the mux tests, set a trap to catch test exit and call cleanup. This will cause cleanup to be invoked twice in case the test times out, or even otherwise, as include.rc also sets a trap to cleanup on exit (TERM and others). This leads to the tarballs generated on failures for these tests to be empty and does not aid debugging. This patch corrects this pattern across the tests to the more standard cleanup at the end. Fixes: bz#1615037 Change-Id: Ib83aeb09fac2aa591b390b9fb9e1f605bfef9a8b Signed-off-by: ShyamsundarR --- tests/bugs/core/multiplex-limit-issue-151.t | 5 ++--- tests/bugs/glusterd/brick-mux-validation.t | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'tests/bugs') diff --git a/tests/bugs/core/multiplex-limit-issue-151.t b/tests/bugs/core/multiplex-limit-issue-151.t index c5bbbdad852..dc9013061b0 100644 --- a/tests/bugs/core/multiplex-limit-issue-151.t +++ b/tests/bugs/core/multiplex-limit-issue-151.t @@ -26,9 +26,6 @@ TEST ! $CLI volume set all cluster.max-bricks-per-process -1 TEST ! $CLI volume set all cluster.max-bricks-per-process foobar TEST $CLI volume set all cluster.max-bricks-per-process 3 -push_trapfunc "$CLI volume set all cluster.brick-multiplex off" -push_trapfunc "cleanup" - TEST $CLI volume create $V0 $H0:$B0/brick{0..5} TEST $CLI volume start $V0 @@ -55,3 +52,5 @@ TEST $CLI volume remove-brick $V0 $H0:$B0/brick3 force EXPECT_WITHIN $PROCESS_UP_TIMEOUT 3 count_brick_processes EXPECT_WITHIN $PROCESS_UP_TIMEOUT 3 count_brick_pids EXPECT_WITHIN $PROCESS_UP_TIMEOUT 6 count_up_bricks + +cleanup; diff --git a/tests/bugs/glusterd/brick-mux-validation.t b/tests/bugs/glusterd/brick-mux-validation.t index 9e1c2c21752..03a476823ca 100644 --- a/tests/bugs/glusterd/brick-mux-validation.t +++ b/tests/bugs/glusterd/brick-mux-validation.t @@ -19,8 +19,6 @@ cleanup; TEST glusterd TEST $CLI volume set all cluster.brick-multiplex on -push_trapfunc "$CLI volume set all cluster.brick-multiplex off" -push_trapfunc "cleanup" TEST $CLI volume create $V0 $H0:$B0/${V0}{1..3} TEST $CLI volume start $V0 @@ -102,4 +100,5 @@ TEST $CLI_IGNORE_PARTITION volume reset-brick $V1 $H0:$B0/${V1}1 $H0:$B0/${V1}1 EXPECT_WITHIN $PROCESS_UP_TIMEOUT 6 online_brick_count EXPECT 1 count_brick_processes -cleanup + +cleanup; \ No newline at end of file -- cgit