diff options
| author | Philipp Stephani | 2020-12-31 00:05:14 +0100 |
|---|---|---|
| committer | Philipp Stephani | 2020-12-31 00:06:04 +0100 |
| commit | f43f1e32e92ef341077b4ffdfdd743b1a6d9d284 (patch) | |
| tree | 6714a3305e58769702a50f8ff55b05e42b1635e9 /test/src | |
| parent | ab5f550bd9ad0bc5d7b6df99093b7eda23218ae6 (diff) | |
| download | emacs-f43f1e32e92ef341077b4ffdfdd743b1a6d9d284.tar.gz emacs-f43f1e32e92ef341077b4ffdfdd743b1a6d9d284.zip | |
Fix a potential unit test breakage on GNU/Linux.
* test/src/process-tests.el
(process-tests/fd-setsize-no-crash/make-process): Allow special exit
codes that can happen if terminal setup fails in the child process.
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/process-tests.el | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/src/process-tests.el b/test/src/process-tests.el index 3a19b6c6f14..590f72f9b03 100644 --- a/test/src/process-tests.el +++ b/test/src/process-tests.el | |||
| @@ -525,7 +525,14 @@ FD_SETSIZE file descriptors (Bug#24325)." | |||
| 525 | (dolist (process processes) | 525 | (dolist (process processes) |
| 526 | (while (accept-process-output process)) | 526 | (while (accept-process-output process)) |
| 527 | (should (eq (process-status process) 'exit)) | 527 | (should (eq (process-status process) 'exit)) |
| 528 | (should (eql (process-exit-status process) 0)))))))))) | 528 | ;; If there's an error between fork and exec, Emacs |
| 529 | ;; will use exit statuses between 125 and 127, see | ||
| 530 | ;; process.h. This can happen if the child process | ||
| 531 | ;; tries to set up terminal device but fails due to | ||
| 532 | ;; file number limits. We don't treat this as an | ||
| 533 | ;; error. | ||
| 534 | (should (memql (process-exit-status process) | ||
| 535 | '(0 125 126 127))))))))))) | ||
| 529 | 536 | ||
| 530 | (ert-deftest process-tests/fd-setsize-no-crash/make-pipe-process () | 537 | (ert-deftest process-tests/fd-setsize-no-crash/make-pipe-process () |
| 531 | "Check that Emacs doesn't crash when trying to use more than | 538 | "Check that Emacs doesn't crash when trying to use more than |