aboutsummaryrefslogtreecommitdiffstats
path: root/test/src/process-tests.el (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* test: Remove redundant "" arg to `mapconcat`Stefan Monnier2022-09-081-2/+2
| | | | | | | | | | | | | | | | | | | * test/src/process-tests.el (process-test-stderr-filter): * test/src/print-tests.el (print-tests-continuous-numbering): * test/src/fns-tests.el (fns-tests-mapconcat): * test/src/data-tests.el (test-bool-vector-to-hex-string): * test/src/casefiddle-tests.el (casefiddle-tests-char-properties) (casefiddle-tests-case-table, casefiddle-tests-casing-character): * test/lisp/tabify-tests.el (tabify-tests--test-changes): * test/lisp/subr-tests.el (subr-tests-bug22027): * test/lisp/sort-tests.el (sort-tests-random-word): * test/lisp/net/hmac-md5-tests.el (hmac-md5-test-encode-string): * test/lisp/md4-tests.el (md4-tests-digest->hex): * test/lisp/emacs-lisp/cl-extra-tests.el (cl-extra-test-map): * test/lisp/dired-tests.el (dired-test-directory-files): * test/lisp/char-fold-tests.el (char-fold--random-word): * test/lisp/ansi-color-tests.el (ansi-color-incomplete-sequences-test): Remove redundant "" arg to `mapconcat`.
* Prefer pos-bol and pos-eol in testsStefan Kangas2022-08-211-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/calendar/todo-mode-tests.el (todo-test-toggle-item-header02, todo-test-edit-item-date-month) (todo-test-multiline-item-indentation-1) (todo-test-multiline-item-indentation-2) (todo-test-multiline-item-indentation-3): * test/lisp/cedet/semantic-utest-ia.el (semantic-ia-utest-buffer) (semantic-sr-utest-buffer-refs): * test/lisp/cedet/semantic-utest.el (semantic-utest-kill-indicator) (semantic-utest-unkill-indicator): * test/lisp/dired-tests.el (dired-test-bug27968): * test/lisp/emacs-lisp/backtrace-tests.el (backtrace-tests--verify-single-and-multi-line): * test/lisp/emacs-lisp/find-func-tests.el (find-func-tests--find-library-verbose): * test/lisp/erc/erc-tests.el (erc-ring-previous-command) (erc-log-irc-protocol): * test/lisp/gnus/message-tests.el (message-mode-propertize): * test/lisp/info-xref-tests.el (info-xref-test-emacs-manuals): * test/lisp/mail/footnote-tests.el (footnote-tests-same-place): * test/lisp/progmodes/elisp-mode-tests.el (elisp-shorthand-completion-at-point): * test/lisp/progmodes/f90-tests.el (f90-test-bug38415): * test/lisp/progmodes/python-tests.el (python-indent-electric-comma-inside-multiline-string) (python-indent-electric-comma-after-multiline-string) (python-indent-electric-colon-1, python-indent-electric-colon-2) (python-indent-electric-colon-3, python-indent-electric-colon-4) (python-mark-defun-2, python-mark-defun-3, python-mark-defun-4) (python-mark-defun-5, python-nav-end-of-defun-2) (python-nav-end-of-statement-1, python-nav-end-of-block-1) (python-indent-dedent-line-backspace-2) (python-indent-dedent-line-backspace-3) (python-eldoc--get-symbol-at-point-1) (python-info-beginning-of-statement-p-1) (python-info-beginning-of-statement-p-2): * test/lisp/replace-tests.el (replace-occur-revert-bug32543) (replace-occur-revert-bug32987): * test/lisp/simple-tests.el (simple-delete-indentation-boundaries) (simple-delete-indentation-region) (line-number-at-pos-in-narrow-buffer) (line-number-at-pos-keeps-restriction): * test/lisp/textmodes/css-mode-tests.el (css-mode-test-selectors) (scss-mode-test-selectors): * test/lisp/textmodes/fill-tests.el (fill-test-unbreakable-paragraph) (fill-test-breakable-paragraph): * test/lisp/time-stamp-tests.el (time-stamp-custom-pattern): * test/src/lread-tests.el (lread-tests--last-message): * test/src/process-tests.el (set-process-filter-t): * test/src/undo-tests.el (undo-test-skip-invalidated-markers): Prefer pos-bol and pos-eol.
* Add STREAM argument to 'process-tty-name'Jim Porter2022-08-051-0/+3
| | | | | | | | | | | | | | | * src/process.c (process-tty-name): Add STREAM argument. * lisp/eshell/esh-io.el (eshell-close-target): Only call 'process-send-eof' once if the process's stdin is a pipe. * test/src/process-tests.el (make-process/test-connection-type): Check behavior of 'process-tty-name'. * doc/lispref/processes.texi (Process Information): Document the new argument. * etc/NEWS: Announce this change.
* Allow creating processes where only one of stdin or stdout is a PTYJim Porter2022-08-051-35/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/lisp.h (emacs_spawn): * src/callproc.c (emacs_spawn): Add PTY_IN and PTY_OUT arguments to specify which streams should be set up as a PTY. (call_process): Adjust call to 'emacs_spawn'. * src/process.h (Lisp_Process): Replace 'pty_flag' with 'pty_in' and 'pty_out'. * src/process.c (is_pty_from_symbol): New function. (make-process): Allow :connection-type to be a cons cell, and allow using a stderr process with a PTY for stdin/stdout. (create_process): Handle creating a process where only one of stdin or stdout is a PTY. * lisp/eshell/esh-proc.el (eshell-needs-pipe, eshell-needs-pipe-p): Remove. (eshell-gather-process-output): Use 'make-process' and set ':connection-type' as needed by the value of 'eshell-in-pipeline-p'. * lisp/net/tramp.el (tramp-handle-make-process): * lisp/net/tramp-adb.el (tramp-adb-handle-make-process): * lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Don't signal an error when ':connection-type' is a cons cell. * test/src/process-tests.el (process-test-sentinel-wait-function-working-p): Allow passing PROC in, and rework into... (process-test-wait-for-sentinel): ... this. (process-test-sentinel-accept-process-output) (process-test-sentinel-sit-for, process-test-quoted-batfile) (process-test-stderr-filter): Use 'process-test-wait-for-sentinel'. (make/process/test-connection-type): New function. (make-process/connection-type/pty, make-process/connection-type/pty-2) (make-process/connection-type/pipe) (make-process/connection-type/pipe-2) (make-process/connection-type/in-pty) (make-process/connection-type/out-pty) (make-process/connection-type/pty-with-stderr-buffer) (make-process/connection-type/out-pty-with-stderr-buffer): New tests. * test/lisp/eshell/esh-proc-tests.el (esh-proc-test--detect-pty-cmd): New variable. (esh-proc-test/pipeline-connection-type/no-pipeline) (esh-proc-test/pipeline-connection-type/first) (esh-proc-test/pipeline-connection-type/middle) (esh-proc-test/pipeline-connection-type/last): New tests. * doc/lispref/processes.texi (Asynchronous Processes): Document new ':connection-type' behavior. (Output from Processes): Remove caveat about ':stderr' forcing 'make-process' to use pipes. * etc/NEWS: Announce this change (bug#56025).
* Teach 'network-lookup-address-info' to validate numeric addressesRobert Pluim2022-07-261-0/+52
| | | | | | | | | | | * src/process.c (Fnetwork_lookup_address_info): Add optional 'hints' argument, pass AI_NUMERICHOST to 'getaddrinfo' if it's 'numeric'. (syms_of_process): Add 'numeric' symbol. * doc/lispref/processes.texi (Misc Network): Expunge passive voice. Update 'network-lookup-address-info' description. * test/src/process-tests.el (lookup-hints-specification): (lookup-hints-values): Test new functionality. * etc/NEWS: Announce change.
* Don't call home from test/src/process-tests.elLars Ingebrigtsen2022-07-111-29/+0
| | | | | | * test/src/process-tests.el (process-num-processors): Move from here... * test/manual/process-callout-tests.el: ... to here (bug#55858).
* Merge from origin/emacs-28Stefan Kangas2022-06-101-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | d02c94090c Fix error reporting in process-async-https-with-delay 9a4862a973 * doc/misc/org.org: Remove spurious markup. 768ed1476a Make Tramp version check more robust 7f778c6943 Fix debugging with GDB when a breakpoint has multiple loca... 25e53e9391 ; * lisp/files.el (file-expand-wildcards): Doc fix. 3ea9357d10 Update documentation of 'aset' and 'store-substring' # Conflicts: # lisp/files.el
| * Fix error reporting in process-async-https-with-delayKen Brown2022-06-081-1/+1
| | | | | | | | | | | | * test/src/process-tests.el (process-async-https-with-delay): Use 'plist-get' instead of 'assq' in testing for a connection error. The 'status' variable is a plist, not an alist. (Bug#55849)
* | Merge from origin/emacs-28Eli Zaretskii2022-01-011-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
| |
* | Declare functions to silence byte-compilerStefan Kangas2021-12-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/auth-source.el (gnutls-symmetric-decrypt, gnutls-ciphers): * lisp/net/dbus.el (libxml-parse-xml-region): * lisp/simple.el (thread-name): * lisp/thread.el (thread-name, thread-signal, thread--blocker) (current-thread, thread-live-p, all-threads): * test/lisp/emacs-lisp/multisession-tests.el (sqlite-close): * test/lisp/net/gnutls-tests.el (gnutls-symmetric-decrypt) (gnutls-symmetric-encrypt, gnutls-hash-mac, gnutls-hash-digest) (gnutls-ciphers, gnutls-digests, gnutls-macs): * test/lisp/net/network-stream-tests.el (gnutls-peer-status): * test/lisp/net/shr-tests.el (libxml-parse-html-region): * test/src/decompress-tests.el (zlib-decompress-region): * test/src/process-tests.el (thread-last-error, thread-join) (make-thread): * test/src/xml-tests.el (libxml-parse-xml-region): Declare functions to silence byte-compiler in --without-all builds.
* | Tag a test from process-tests.el as :unstable on emba.Michael Albinus2021-11-251-0/+1
| | | | | | | | | | * test/src/process-tests.el (process-tests/multiple-threads-waiting): Tag it as :unstable on emba.
* | Prefer ert-with-temp-(directory|file) in most remaining testsStefan Kangas2021-11-081-18/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/lisp/auth-source-tests.el (auth-source-test-searches): * test/lisp/autorevert-tests.el (auto-revert-test00-auto-revert-mode) (auto-revert-test01-auto-revert-several-files) (auto-revert-test02-auto-revert-deleted-file) (auto-revert-test03-auto-revert-tail-mode) (auto-revert-test04-auto-revert-mode-dired) (auto-revert-test05-global-notify) (auto-revert-test06-write-file) (auto-revert-test07-auto-revert-several-buffers): * test/lisp/calendar/icalendar-tests.el (icalendar-tests--do-test-cycle): * test/lisp/custom-tests.el (custom-theme--load-path): * test/lisp/dired-aux-tests.el (dired-test-bug27496) (with-dired-bug28834-test): * test/lisp/emacs-lisp/bytecomp-tests.el (test-byte-comp-compile-and-load) (bytecomp-tests--dest-mountpoint) (bytecomp-tests--target-file-no-directory): * test/lisp/emacs-lisp/gv-tests.el (gv-tests--in-temp-dir): * test/lisp/eshell/eshell-tests.el (with-temp-eshell) (eshell-test-command-result): * test/lisp/info-xref-tests.el (info-xref-test-makeinfo): * test/lisp/vc/vc-tests.el (vc-test--create-repo) (vc-test--register, vc-test--state, vc-test--working-revision) (vc-test--checkout-model, vc-test--rename-file) (vc-test--version-diff): * test/src/buffer-tests.el (test-kill-buffer-auto-save-delete): * test/src/comp-tests.el (comp-tests-bootstrap): * test/src/process-tests.el (process-test-quoted-batfile): Prefer 'ert-with-temp-(directory|file)' to using 'make-temp-file' directly.
* | Replace some macros with ert-with-temp-(file|directory)Stefan Kangas2021-11-061-13/+2
|/ | | | | | | | | | | | * test/lisp/custom-tests.el (custom-tests--with-temp-dir): * test/lisp/files-tests.el (files-tests--with-temp-file): * test/lisp/progmodes/project-tests.el (project-tests--with-temporary-directory): * test/src/emacs-module-tests.el (module--with-temp-directory): * test/src/emacs-tests.el (emacs-tests--with-temp-file): * test/src/lread-tests.el (lread-tests--with-temp-file): * test/src/process-tests.el (process-tests--with-temp-directory): Replace macros with 'ert-with-temp-(file|directory)'. Update callers.
* New function num-processorsPaul Eggert2021-10-101-0/+6
| | | | | | | | | | | | | | | | | | | This addresses a FIXME comment in lisp/emacs-lisp/comp.el, relating to the number of subsidiary processes used by comp-run-async-workers in native compilation. * admin/merge-gnulib (GNULIB_MODULES): Add nproc. * doc/lispref/processes.texi (Process Information), etc/NEWS: Document num-processors. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * lib/nproc.c, lib/nproc.h, m4/nproc.m4: New files, copied from Gnulib by admin/merge-gnulib. * lisp/emacs-lisp/comp.el (w32-get-nproc): Remove decl. (comp-effective-async-max-jobs): Use num-processors. * src/process.c: Include nproc.h. (Fnum_processors): New function. (syms_of_process): Define ‘all’, ‘current’, ‘num-processors’. * src/w32proc.c (Fw32_get_nproc): Add FIXME comment. * test/src/process-tests.el (process-num-processors): New test.
* ; Minor stylistic checkdoc fixes in test/**/*.elStefan Kangas2021-09-261-1/+1
|
* Block TLS handshake until TCP connection establishedMattias Engdegård2021-07-131-0/+30
| | | | | | | | | | | | | | | | | | | If a TLS handshake is attempted before the completion of an asynchronous TCP connection has been ascertained, our local state will not be set up correctly for further progress and the sentinel "open" event will never be sent. This can occur if sufficient time passes after the initiation of an async TCP connection so that by the time `wait_reading_process_output` is called, the connection has already been established on the TCP level. This somewhat timing-sensitive bug has plagued HTTPS connections on some platforms, notably macOS, for a long time (bug#49449). * src/process.c (wait_reading_process_output): Gate the TLS handshake by the NON_BLOCKING_CONNECT_FD flag. The flag will be cleared as soon as the TCP socket is found to be writable. * test/src/process-tests.el (process-async-https-with-delay): New test.
* Skip a process test on Cygwin to avoid hangKen Brown2021-07-091-0/+2
| | | | | | | * test/src/process-tests.el (process-tests/fd-setsize-no-crash/make-network-process): Skip test on Cygwin to avoid hang due to connect/accept handshake. (Bug#49496)
* Remove unnecessary requires of rxStefan Kangas2021-03-221-1/+0
| | | | | * lisp/cedet/semantic/wisent/python.el (rx): * test/src/process-tests.el (rx): Remove unnecessary requires.
* Skip tests that require Internet when there's no InternetRobert Pluim2021-02-221-7/+15
| | | | | | | | | | | | | | | | | | | | | Bug#46641 The network-stream-tests actually work fine when the local machine has no IP at all, but cause a crash in the GnuTLS library when there is an IP configured but the interface is down. * test/lisp/net/network-stream-tests.el (internet-is-working): New defvar, checks if we can resolve "google.com". (connect-to-tls-ipv4-nowait, connect-to-tls-ipv6-nowait) (open-network-stream-tls-nowait, open-gnutls-stream-new-api-nowait) (open-gnutls-stream-old-api-nowait): Use it to check for working Internet access. * test/src/process-tests.el (internet-is-working): New defvar, checks if we can resolve "google.com". (lookup-family-specification, lookup-unicode-domains) (unibyte-domain-name, lookup-google, non-existent-lookup-failure): Use it to check for working Internet access.
* ; Fix byte-compilation warningEli Zaretskii2021-02-061-1/+1
| | | | | * test/src/process-tests.el (process-sentinel-interrupt-event): Fix byte compilation warning.
* ; Fix last changeEli Zaretskii2021-02-061-2/+1
|
* New test for src/process.c on MS-WindowsIoannis Kappas2021-02-061-0/+29
| | | | | | | * test/src/process-tests.el (process-sentinel-interrupt-event): New test. (Bug#46284) Copyright-paperwork-exempt: yes
* Add more assertions to recently-added process test.Philipp Stephani2021-01-241-1/+2
| | | | | | * test/src/process-tests.el (process-tests/multiple-threads-waiting): Also check that 'thread-join' and 'thread-last-error' return the expected errors.
* Add a unit test testing interaction between threads and processes.Philipp Stephani2021-01-231-0/+29
| | | | | | | | This unit test tests that we can call 'accept-process-output' in parallel from multiple threads. * test/src/process-tests.el (process-tests/multiple-threads-waiting): New unit test.
* Replace Unix commands with Emacs in process tests.Philipp Stephani2021-01-181-9/+71
| | | | | | | | | | | | That way, the tests only depend on Emacs, and not on utilities that might not be available during test time. * test/src/process-tests.el (process-tests--eval) (process-tests--emacs-command, process-tests--emacs-binary) (process-tests--dump-file) (process-tests--usable-file-for-reinvoke): New helper functions. (process-tests/sentinel-called) (process-tests/sentinel-with-multiple-processes): Use them.
* Ensure that sentinels are called during 'accept-process-output'.Philipp Stephani2021-01-171-0/+53
| | | | | | | | | | | | When we're trying to notify a process about a status change, we need to ignore the SIGCHLD pipe temporarily, otherwise the code would likely not run into the timeout case that's necessary for a status change to happen. * src/process.c (wait_reading_process_output): Ignore the SIGCHLD pipe when notifying a process about a status change. * test/src/process-tests.el (process-tests/sentinel-called) (process-tests/sentinel-with-multiple-processes): New unit tests.
* Fix deadlock when receiving SIGCHLD during 'pselect'.Philipp Stephani2021-01-161-5/+0
| | | | | | | | | | | | | | | | | | | | | | If we receive and handle a SIGCHLD signal for a process while waiting for that process, 'pselect' might never return. Instead, we have to explicitly 'pselect' that the process status has changed. We do this by writing to a pipe in the SIGCHLD handler and having 'wait_reading_process_output' select on it. * src/process.c (child_signal_init): New helper function to create a pipe for SIGCHLD notifications. (child_signal_read, child_signal_notify): New helper functions to read from/write to the child signal pipe. (create_process): Initialize the child signal pipe on first use. (handle_child_signal): Notify waiters that a process status has changed. (wait_reading_process_output): Make sure that we also catch SIGCHLD/process status changes. * test/src/process-tests.el (process-tests/fd-setsize-no-crash/make-process): Remove workaround, which is no longer needed.
* Only run IPv6 tests if we have an IPv6 addressRobert Pluim2021-01-121-5/+16
| | | | | | | | | | | | | | * test/src/process-tests.el (ipv6-is-available): New function for checking whether we have a globally routable IPv6 prefix assigned. (lookup-family-specification): Use 'ipv6-is-available' to check for IPv6. Use 'localhost' instead of 'google.com' to test 'network-lookup-address-info' API. (lookup-google): Use 'ipv6-is-available' to check for IPv6. * test/lisp/net/nsm-tests.el (nsm-ipv6-is-available): Rename to 'ipv6-is-available', make identical to the one in test/src/process-tests.el.
* Increase probability that a process test succeeds.Philipp Stephani2021-01-101-0/+5
| | | | | | * test/src/process-tests.el (process-tests/fd-setsize-no-crash/make-process): Work around potential Emacs bug.
* Fix process-tests on MS-WindowsEli Zaretskii2021-01-051-0/+11
| | | | | | | It was again broken by recent changes. * test/src/process-tests.el (process-tests/fd-setsize-no-crash/make-serial-process): Skip test on MS-Windows.
* Make a process tests a bit more robust.Philipp Stephani2021-01-041-2/+5
| | | | | | * test/src/process-tests.el (process-tests/fd-setsize-no-crash/make-process): Allow for processes to fail before 'exec'.
* Make a process test faster.Philipp Stephani2021-01-021-3/+5
| | | | | | | | | | | | The test 'process-tests/fd-setsize-no-crash/make-process' used to call 'sleep' to ensure that enough processes are live to trigger a FD_SETSIZE overflow. However, we can just call 'cat' instead and close standard input when done. That way, we only wait as long as needed. * process-tests.el (process-tests/fd-setsize-no-crash/make-process): Invoke 'cat' instead of 'sleep'. Close standard input to exit the 'cat' processes.
* Simplify TTY allocation.Philipp Stephani2021-01-021-59/+12
| | | | | | | | | | | | The 'process-tty-name' already provides the TTY name, we don't have interrogate the TTY host. * test/src/process-tests.el (process-tests/fd-setsize-no-crash/make-serial-process): Use 'process-tty-name' instead of having the TTY host print its TTY name. Check whether TTY names are unique. (process-tests--new-pty, process-tests--with-temp-file): Remove; no longer used.
* Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* Fix process-tests on MS-WindowsEli Zaretskii2020-12-311-0/+7
| | | | | * test/src/process-tests.el (process-tests--fd-setsize-test): On MS-Windows start the pipe processes in the "stopped" condition.
* * test/src/process-tests.el: Let timeouts fail the tests. Fix some docstringsMichael Albinus2020-12-311-26/+26
|
* Unbreak process tests if 'errno' is not installed.Philipp Stephani2020-12-311-1/+3
| | | | | * test/src/process-tests.el (process-tests--EMFILE-message): Don't signal an error if the 'errno' binary is unavailable.
* Manually limit file descriptors that we select on to FD_SETSIZE.Philipp Stephani2020-12-311-29/+71
| | | | | | | | | | | | | | | | | | This works even if another thread or process resets the resource limit for open file descriptors, e.g., using 'prlimit' on GNU/Linux. * src/process.c (create_process, create_pty, Fmake_pipe_process) (Fmake_serial_process, connect_network_socket) (server_accept_connection): Limit file descriptors to FD_SETSIZE. * test/src/process-tests.el (process-tests--with-raised-rlimit): New helper macro. (process-tests--fd-setsize-test): Rename from 'process-tests--with-many-pipes'. Increase resource limit during test if possible. (process-tests/fd-setsize-no-crash/make-process) (process-tests/fd-setsize-no-crash/make-pipe-process) (process-tests/fd-setsize-no-crash/make-network-process) (process-tests--new-pty): Rename callers.
* Fix a potential unit test breakage on GNU/Linux.Philipp Stephani2020-12-311-1/+8
| | | | | | * 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.
* Fix an incorrect Edebug specification.Philipp Stephani2020-12-301-1/+1
| | | | | * test/src/process-tests.el (process-tests--with-many-pipes): Fix incorrect Edebug specification.
* Extend and overhaul FD_SETSIZE overflow tests.Philipp Stephani2020-12-301-35/+307
| | | | | | | | | | | | | | | | | | | | | | | | 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: Fix comment style.Philipp Stephani2020-12-301-1/+1
|
* A better fix for process-tests on MS-WindowsEli Zaretskii2020-12-291-2/+3
| | | | | | | | | * 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.
* Fix process-tests on MS-WindowsEli Zaretskii2020-12-291-0/+1
| | | | | | * test/src/process-tests.el (process-tests/fd-setsize-no-crash): Skip this test on windows-nt systems, as we cannot use more than FD_SETSIZE file descriptors there: if we try, we crash.
* Instrument process-tests.el for timeouts on embaMichael Albinus2020-12-291-19/+38
|
* Add a regression test for Bug#24325.Philipp Stephani2020-12-291-0/+35
| | | | | * test/src/process-tests.el (process-tests/fd-setsize-no-crash): New unit test.
* ; Fix license statements.Stefan Kangas2020-08-271-3/+5
|
* Use lexical-binding in most src testsStefan Kangas2020-04-241-7/+7
| | | | | | | | | | | | | | | | | | | | * test/src/charset-tests.el: * test/src/chartab-tests.el: * test/src/cmds-tests.el: * test/src/coding-tests.el (top-level) (generate-ascii-file, generate-mostly-nonascii-file): * test/src/doc-tests.el: * test/src/floatfns-tests.el: * test/src/font-tests.el: * test/src/keymap-tests.el: * test/src/process-tests.el (top-level) (process-test-sentinel-wait-function-working-p) (process-test-stderr-buffer, process-test-stderr-filter): * test/src/textprop-tests.el: * test/src/thread-tests.el: * test/src/timefns-tests.el: * test/src/undo-tests.el: * test/src/xml-tests.el: Use lexical-binding.