There seem to be races in the new comint-tests; they frequently hang and/or fail when run (make check) on macOS. This patch should improve matters. OK for emacs-27?