cpsughrue wrote: > I haven't read the PR in details but one thing we found difficult to do is > how to write a test for daemon spawning logic, because if anything went > wrong, you left an unbounded daemon process on CI node. > > The strategy in this PR (try to kill it after the test finishes) definitely > doesn't work because 1. if anything failed, you will not hit kill. 2. you are > going to kill the daemon from a different test that runs in parallel.
1. Great point, I did not think of that. 2. The tests are set up so that each one spawns, interacts with, and kills its own daemon, so parallel tests shouldn't kill one another's daemon. > Other things we tried and know didn't work: > > * explicitly start/stop daemon with command: you might not hit stop due to > failure > * have a timeout and let the daemon terminate after that: you can have some > infinite loop that prevents daemon cleanup > > What we ended up is to have a server process that spawns clang job that needs > to talk to it. We eliminated the run off daemons but we don't really have > coverage for how clang spawns a daemon when needed. Implementing a timeout as part of this patch as a safety measure seems worth while too but I'm not sure I understand your final solution. You all spawned a clang job that had to communicate with the daemon to make sure one did not exist? https://github.com/llvm/llvm-project/pull/67562 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits