From 57e872ac757d7a003f4a7f132a08798c3a1a6e97 Mon Sep 17 00:00:00 2001 From: Philipp Stephani Date: Mon, 4 Jan 2021 22:08:39 +0100 Subject: [PATCH] Make a process tests a bit more robust. * test/src/process-tests.el (process-tests/fd-setsize-no-crash/make-process): Allow for processes to fail before 'exec'. --- test/src/process-tests.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/src/process-tests.el b/test/src/process-tests.el index 5294bc07ce5..1f88232c7fc 100644 --- a/test/src/process-tests.el +++ b/test/src/process-tests.el @@ -560,8 +560,11 @@ FD_SETSIZE file descriptors (Bug#24325)." ;; We should have managed to start at least one process. (should processes) (dolist (process processes) - (should (process-live-p process)) - (process-send-eof process) + ;; The process now should either be running, or have + ;; already failed before `exec'. + (should (memq (process-status process) '(run exit))) + (when (process-live-p process) + (process-send-eof process)) (while (accept-process-output process)) (should (eq (process-status process) 'exit)) ;; If there's an error between fork and exec, Emacs -- 2.39.5