patch-tests_socket_tst 1.0 KB

123456789101112131415161718192021222324252627
  1. $OpenBSD: patch-tests_socket_tst,v 1.1 2010/08/23 16:31:33 jasper Exp $
  2. This test assumes that a nonblocking connect to a closed port will
  3. never fail, the failure will always occur when trying to read from the
  4. socket.
  5. --- tests/socket.tst.orig Wed Nov 26 01:10:25 2008
  6. +++ tests/socket.tst Fri Jul 30 11:16:17 2010
  7. @@ -515,10 +515,13 @@ T
  8. ;; no one should be listening on 12345
  9. ;; <http://article.gmane.org/gmane.lisp.clisp.general/12286>
  10. (socket:socket-connect 12345 "localhost" :timeout 30) ERROR ; ECONNREFUSED
  11. -(open-stream-p (setq *socket-1* (socket:socket-connect
  12. - 12345 "localhost" :timeout 0))) T
  13. -(read-line *socket-1*) ERROR ; ECONNREFUSED
  14. -(close *socket-1*) T
  15. +(and (setq *socket-1* nil
  16. + *socket-1* (socket:socket-connect
  17. + 12345 "localhost" :timeout 0))
  18. + (open-stream-p *socket-1*)
  19. + (read-line *socket-1*)) ERROR ; ECONNREFUSED
  20. +(or (null *socket-1*)
  21. + (close *socket-1*)) T
  22. (let ((interfaces '(nil "localhost" "0.0.0.0" "127.0.0.1")))
  23. (mapcar (lambda (i)