Skip to content

Conversation

chen1195585098
Copy link
Contributor

Modification includes:

  1. change 'echo' cmd in function force_terminate as a subshell, to ensure immediate buffer flush. Otherwise, extra stdout buffer in function cleanup may be redirected to stderr, in such a case, function call in cleanup may get something wrong.
  2. change --foreground as a optional setting, since it affects signal detection and cleanup procedure.

With this patch, by default, even if the use case times out, the cleanup process will proceed as expected. And the test env always keep clean after testcase exits.

Fixes: #4610

Related patches:
run-tests.sh: stop test on Ctrl-C
1f03309

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

Modification includes:
1. change 'echo' cmd in function force_terminate as a subshell,
   to ensure immediate buffer flush. Otherwise, extra stdout
   buffer in function cleanup may be redirected to stderr, in
   such a case, function call in cleanup may get something
   wrong.
2. change --foreground as a optional setting, since it affects
   signal detection and cleanup procedure.

With this patch, by default, even if the use case times out,
the cleanup process will proceed as expected. And the test env
always keep clean after testcase exits.

Fixes: gluster#4610

Related patches:
run-tests.sh: stop test on Ctrl-C
gluster@1f03309

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

Signed-off-by: chenjinhao <chen.jinhao@zte.com.cn>
@chen1195585098
Copy link
Contributor Author

Hi, @xhernandez @pkalever , could you please review this patch when you have a moment?

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cleanup is not called as expected when regression tests time out, which leads to unclean test env for next regression test and may cause tests stucked.
1 participant