mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-09-05 04:27:55 +00:00
4e44053f32
The respawn tests cover the pacing in xCAT::RespawnUtils. Two things the daemon itself has to do are untested. A SIGCHLD handler that does not clear $pid_MON leaves xcatd holding a dead pid, so the service loop never re-forks the monitor. Only ssl_reaper clears it, and generic_reaper is the handler at startup and again while connections are throttled. The respawn block also runs from the middle of the service loop, so the child inherits the client connections the parent has accepted but not yet dispatched. xcatd cannot be loaded in a unit test, so the two reapers and the respawn fork block are lifted out of the program text and run in a scratch package against stand-in descriptors. generic_reaper fails, and so does the pending-connection assertion; ssl_reaper passes and guards the path that already works. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>