timp icon indicating copy to clipboard operation
timp copied to clipboard

Creating threads fail on emacs 25

Open mola-T opened this issue 8 years ago • 3 comments

(setq testprocess
      (make-network-process :name "test"
                            :host 'local
                            :server t
                            :service t
                            :family 'ipv4))

:service t is not accepted in Emacs 25.

https://www.gnu.org/software/emacs/manual/html_node/elisp/Network-Processes.html

:service service

service specifies a port number to connect to; or, for a server, the port number to listen on. It should be a service name that translates to a port number, or an integer specifying the port number directly. For a server, it can also be t, which means to let the system select an unused port number.

Seems to be a bug on Emacs 25. Any suggestion???

mola-T avatar May 10 '16 11:05 mola-T

https://github.com/emacs-mirror/emacs/blob/master/test/lisp/net/network-stream-tests.el

(ert-deftest make-ipv4-tcp-server-with-unspecified-port ()
  (let ((server
         (make-network-process
          :name "server"
          :server t
          :noquery t
          :family 'ipv4
          :service t
          :host 'local)))
    (should (and (arrayp (process-contact server :local))
                 (numberp (aref (process-contact server :local) 4))
                 (> (aref (process-contact server :local) 4) 0)))
    (delete-process server)))

M-x ert-run-tests-interactively

On emacs 25.1.x

Selector: make-ipv4-tcp-server-with-unspecified-port
Passed:  0
Failed:  1 (1 unexpected)
Skipped: 0
Total:   1/1

Started at:   2016-05-10 04:43:39-0700
Finished.
Finished at:  2016-05-10 04:43:39-0700

F

F make-ipv4-tcp-server-with-unspecified-port
    (error "Invalid argument 4 of operation ‘open-network-stream’")

On Emacs 24.5

Selector: make-ipv4-tcp-server-with-unspecified-port
Passed:  1
Failed:  0
Skipped: 0
Total:   1/1

Started at:   2016-05-10 19:46:48+0800
Finished.
Finished at:  2016-05-10 19:46:48+0800

mola-T avatar May 10 '16 11:05 mola-T

https://github.com/emacs-mirror/emacs/commit/4aa55338ff3af1cd4e87802e02156e636d212241

mola-T avatar May 25 '16 11:05 mola-T

This test works for me on Emacs 25.1:

Selector: make-ipv4-tcp-server-with-unspecified-port
Passed: 1
Failed: 0
Total:  1/1

Started at:   2016-10-05 15:53:45+0700
Finished.
Finished at:  2016-10-05 15:53:45+0700

s-kostyaev avatar Oct 05 '16 08:10 s-kostyaev