tevent test failures on debian

Michael Tokarev mjt at tls.msk.ru
Mon May 2 17:57:18 UTC 2022

01.05.2022 23:01, Michael Tokarev via samba-technical wrote:
> /usr/bin/make -j1 test
> make[2]: Entering directory '/builds/samba-team/tevent/debian/output/source_dir'
> PYTHONHASHSEED=1 WAF_MAKE=1  `PATH=buildtools/bin:../../buildtools/bin:$PATH which waf` test
> test: test_fd_tag
> success: test_fd_tag
> test: test_timer_tag
> success: test_timer_tag
> test: test_signal_tag
> success: test_signal_tag
> test: test_immediate_tag
> success: test_immediate_tag
> test: test_trace_event_fd__loop
> failure: test_trace_event_fd__loop [
> tctx->before_handler
> ../../tests/test_tevent_trace.c:398: error: Failure!
> ]
> ...

This happens because debian's salsa-ci run whole thing with fd#0 *closed*.

And indeed, I can reproduce this by running

   ./bin/test_tevent_trace  0<&-

Looking at strace, it gets fd#0 for epoll_create().
Next in tevent_loop_one() it tries to add that one into its own fdset,
receives EINVAL, and *closes* fd0.  Wow.

Where it sets this before_handler to true I can't see.
It looks like this should be investigated. Because the callbacks
are *not* fired.

Now this is double fun. Because for one, salsa-ci should have a
reasonable environment, and for two, this test should not fail
in such a disgusting way :)

dh_auto_test run tests with redirecting fd#0 from /dev/null, this
is why it worked.



More information about the samba-technical mailing list