On Wed, Feb 16, 2022 at 10:51:28AM +0100, Thomas Klausner wrote:
> Hi!
> 
> NetBSD recently got an eventfd interface which is supposedly
> compatible to Linux's.
> 
> net/zeromq uses eventfds and has lots of assertions in its test code,
> and I looked at one of them. It basically makes a new eventfd and then
> tries to set it to non-blocking mode using fcntl. This fails with
> 'operation not supported'.
> 
> I see that eventfd() is documented as having a flag for non-blocking
> mode when creating the eventfd, but since zeromq is doing this using
> fnctl(), I guess this is supposed to work that way as well.
> 
> Is this a bug in NetBSD's eventfd implementation or is zeromq wrong
> here?
>  Thomas

For context, if I disable the use of eventfd in zeromq, the test failures go 
down from

eventfd:

# TOTAL: 104
# PASS:  11
# FAIL:  81

no eventfd:

# TOTAL: 104
# PASS:  89
# FAIL:  3

 Thomas
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/net/zeromq/Makefile,v
retrieving revision 1.33
diff -u -r1.33 Makefile
--- Makefile    2 Jan 2022 00:17:33 -0000       1.33
+++ Makefile    16 Feb 2022 10:12:21 -0000
@@ -20,6 +20,7 @@
 TEST_TARGET=           check
 
 BUILDLINK_TRANSFORM+=  rm:-Werror
+CONFIGURE_ARGS+=       ac_cv_header_sys_eventfd_h=no
 
 .include "../../mk/bsd.prefs.mk"
 

Reply via email to