tests: make sure cleanup is called as expect when tests time out - #4611
tests: make sure cleanup is called as expect when tests time out#4611chen1195585098 wants to merge 1 commit into
Conversation
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>
|
Hi, @xhernandez @pkalever , could you please review this patch when you have a moment? Thanks :) |
|
Hi @chen1195585098 — your diagnosis here was right: 1f03309's While verifying this change we found the problem runs deeper than the flag: We have proposed #4738, which keeps your group-signal insight and adds harness-side supervision (plus an idempotent sweep, so the outcome no longer depends on the race), with reproduction drivers and A/B results on real hardware. Your review there would be very welcome. |
Modification includes:
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