emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 57e872a: Make a process tests a bit more robust.


From: Philipp Stephani
Subject: master 57e872a: Make a process tests a bit more robust.
Date: Mon, 4 Jan 2021 16:23:35 -0500 (EST)

branch: master
commit 57e872ac757d7a003f4a7f132a08798c3a1a6e97
Author: Philipp Stephani <phst@google.com>
Commit: Philipp Stephani <phst@google.com>

    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 5294bc0..1f88232 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]