]> git.eshelyaron.com Git - emacs.git/commitdiff
Make a process tests a bit more robust.
authorPhilipp Stephani <phst@google.com>
Mon, 4 Jan 2021 21:08:39 +0000 (22:08 +0100)
committerPhilipp Stephani <phst@google.com>
Mon, 4 Jan 2021 21:13:32 +0000 (22:13 +0100)
* 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

index 5294bc07ce5d0659316e744e0f979b5e5726aa67..1f88232c7fc80d1bb762651391ea41c3b0663a5c 100644 (file)
@@ -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