summaryrefslogtreecommitdiff
path: root/test/src
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2020-12-29 21:30:59 +0200
committerEli Zaretskii <eliz@gnu.org>2020-12-29 21:30:59 +0200
commitbaac3562a669ef4570cc258b5e6fc6472a6c9407 (patch)
tree019abdc1f967917a3c2ee119ec3e09ff8d057d9b /test/src
parent0326cddc7bb2a90924af200057b4e2ef263924c8 (diff)
downloademacs-baac3562a669ef4570cc258b5e6fc6472a6c9407.tar.gz
emacs-baac3562a669ef4570cc258b5e6fc6472a6c9407.tar.bz2
emacs-baac3562a669ef4570cc258b5e6fc6472a6c9407.zip
A better fix for process-tests on MS-Windows
* src/w32.c (pipe2): When forcibly closing pipe handles due to overflow of FD_SETSIZE, set the handles to -1, to avoid assertion violations in emacs_close. * test/src/process-tests.el (process-tests/fd-setsize-no-crash): No need to skip this test anymore.
Diffstat (limited to 'test/src')
-rw-r--r--test/src/process-tests.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/src/process-tests.el b/test/src/process-tests.el
index 3272044afcc..aeb5b750212 100644
--- a/test/src/process-tests.el
+++ b/test/src/process-tests.el
@@ -389,11 +389,12 @@ See Bug#30460."
(ert-deftest process-tests/fd-setsize-no-crash ()
"Check that Emacs doesn't crash when trying to use more than
FD_SETSIZE file descriptors (Bug#24325)."
- (skip-unless (not (eq system-type 'windows-nt)))
(with-timeout (60)
(let ((sleep (executable-find "sleep"))
;; FD_SETSIZE is typically 1024 on Unix-like systems.
- (fd-setsize 1024)
+ ;; On MS-Windows we artificially limit FD_SETSIZE to 64,
+ ;; see the commentary in w32proc.c.
+ (fd-setsize (if (eq system-type 'windows-nt) 64 1024))
;; `make-process' allocates at least four file descriptors per process
;; when using the pipe communication method. However, it closes two of
;; them in the parent process, so we end up with only two new