]> git.eshelyaron.com Git - emacs.git/commit
Extend and overhaul FD_SETSIZE overflow tests.
authorPhilipp Stephani <phst@google.com>
Wed, 30 Dec 2020 21:28:06 +0000 (22:28 +0100)
committerPhilipp Stephani <phst@google.com>
Wed, 30 Dec 2020 22:04:31 +0000 (23:04 +0100)
commit3a6137a498fe065cadbbf9a1f0575623155a9e55
tree387b44b3c301b2a1e28bcd199e2888962432448f
parent72dc46584cec3652c910b7c414e83353a5b536e9
Extend and overhaul FD_SETSIZE overflow tests.

Instead of trying to generate the right number of processes,
pre-create lots of unused pipe processes until creation fails.  Extend
the tests to the 'pty' connection type and other kinds of process
objects.

* test/src/process-tests.el (process-tests--ignore-EMFILE)
(process-tests--with-buffers, process-tests--with-processes)
(process-tests--with-many-pipes, process-tests--with-temp-file)
(process-tests--with-temp-directory): New helper macros.
(process-tests/fd-setsize-no-crash/make-process): Renamed from
'process-tests/fd-setsize-no-crash'.  Fail on timeout.  Also test the
'pty' connection type.  Pre-create lots of pipe processes so we reach
the FD_SETSIZE limit faster.  Ignore EMFILE more precisely, if
possible.
(process-tests/fd-setsize-no-crash/make-pipe-process)
(process-tests/fd-setsize-no-crash/make-network-process)
(process-tests/fd-setsize-no-crash/make-serial-process): New tests
that test FD_SETSIZE limits for other kinds of processes.
(process-tests--EMFILE-message): New helper function and cache
variable.
(process-tests--new-pty): New helper function.
test/src/process-tests.el