Wait for systest processes to exit before removing data directories (#5211) * Wait for systest processes to exit before removing data directories The shared systest cleanup and the exit trap of bind_failure.sh killed the nodes and removed their data directories right away, while the nodes were still shutting down and writing to them. On CI bind_failure.sh printed its PASS and then exited 1: `rm -rf` failed with "Directory not empty" on the RocksDB directory of the node it had just signalled, and `set -e` made that the script's exit status. The cleanup now waits for every registered process to exit before it dumps log tails and removes data directories, so a dumped tail also ends with the node's shutdown. A process still running 30 seconds after SIGTERM gets SIGKILL, so a hung process cannot stall CI, and the test result stands either way. `new_datadir` never registered a directory: scripts call it in a `$(...)` subshell, which dropped the list it appended to, so the cleanup removed no data directory and dumped no log tail. It now creates the directories inside one temporary directory made when common.sh is sourced, and the cleanup finds them there. bind_failure.sh now uses the shared helpers instead of its own exit trap and readiness loop. * Move the remaining systests onto the shared helpers daemon_interrupt.sh, rpc_stop.sh and runtime_files.sh had their own exit traps, which removed the data directory without waiting for the node when a test failed while the node was running, and their own readiness loops. cli_wallet_create.sh and node_initialize.sh never removed their data directories at all. They now use `new_datadir`, `register_pid` and `wait_for_file` from lib/common.sh, so every systest stops its processes, dumps log tails on failure and removes its data directories the same way. runtime_files.sh now fails at the readiness wait when the node does not come up, where it used to carry on to its later checks.
__________
Type: commit
Hash: d0bd70cbc7ba0742b32d08bd4dda78cba4718e98
Created: yesterday
__________
gr0v1ty/nano-node:d0bd70cbc7ba0742b32d08bd4dda78cba4718e98
| Test Case | Status | Duration | Median Deviation | Log | Graph |
|---|