Allow use of SB-RT's mechanism for expected test failures in contribs
[sbcl.git] / contrib / sb-bsd-sockets / tests.lisp
index de2a441..827b7c0 100644 (file)
@@ -3,6 +3,12 @@
 
 (in-package :sb-bsd-sockets-test)
 
+(defmacro deftest* ((name &key fails-on) form &rest results)
+  `(progn
+     (when (sb-impl::featurep ',fails-on)
+       (pushnew ',name sb-rt::*expected-failures*))
+     (deftest ,name ,form ,@results)))
+
 ;;; a real address
 (deftest make-inet-address
   (equalp (make-inet-address "127.0.0.1")  #(127 0 0 1))
   (integerp (get-protocol-by-name "udp"))
   t)
 
+;;; See https://bugs.launchpad.net/sbcl/+bug/659857
+;;; Apparently getprotobyname_r on FreeBSD says -1 and EINTR
+;;; for unknown protocols...
+#-(and freebsd sb-thread)
 (deftest get-protocol-by-name/error
   (handler-case (get-protocol-by-name "nonexistent-protocol")
     (unknown-protocol ()