Bigcheese wrote: > > 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? > > It is something like this: > https://github.com/apple/llvm-project/blob/next/clang/test/CAS/fdepscan-daemon.c > > The "daemon" binary can be launched as a normal process and it takes `--` > option, which has the arguments of the clang process it needs to run that > talk to itself. The lifetime of the "daemon" is now bounded to that normal > process and will not be left behind after testing is done.
I agree with doing this for all the non daemon launch tests. For those you can just run clang in a way that lit doesn't care if it fails, kill the daemon, then check the output of clang. It doesn't really need to do a fully clean shutdown as no other process should be connecting, it can just call `shutdownDaemon`. 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