zeromq / libzmq

ZeroMQ core engine in C++, implements ZMTP/3.1
https://www.zeromq.org
Mozilla Public License 2.0
9.74k stars 2.36k forks source link

FAIL: tests/test_radio_dish #4621

Open ellert opened 1 year ago

ellert commented 1 year ago

Issue description

When running "make check" the tests/test_radio_dish test fails:

tests/test_radio_dish.cpp:498:test_radio_dish_no_loop_ipv4:FAIL: Expected -1 Was 7

This test is skipped on Windows:

https://github.com/zeromq/libzmq/blob/3e08ecc0124a130220f4c8c046e5ba7f919b32df/tests/test_radio_dish.cpp#L464-L469

But it doesn't seem to work on Linux either, According to the error message 7 bytes are received, which is the length of the message sent, but with ZMQ_MULTICAST_LOOP=false no message should be received. So it looks like it fails the same way on Linux as on Windows.

Environment

Minimal test code / Steps to reproduce the issue

  1. ./configure --enable-drafts
  2. make
  3. make check

What's the actual result? (include assertion message & call stack if applicable)

FAIL: tests/test_radio_dish

WARNING: Forced closure of 2 sockets, this is an implementation error unless the test case failed tests/test_radio_dish.cpp:510:test_leave_unjoined_fails:PASS tests/test_radio_dish.cpp:511:test_join_too_long_fails:PASS tests/test_radio_dish.cpp:512:test_long_group:PASS tests/test_radio_dish.cpp:513:test_join_twice_fails:PASS tests/test_radio_dish.cpp:514:test_radio_bind_fails_ipv4:PASS tests/test_radio_dish.cpp:515:test_radio_bind_fails_ipv6:PASS tests/test_radio_dish.cpp:516:test_dish_connect_fails_ipv4:PASS tests/test_radio_dish.cpp:517:test_dish_connect_fails_ipv6:PASS tests/test_radio_dish.cpp:518:test_radio_dish_tcp_poll_ipv4:PASS tests/test_radio_dish.cpp:519:test_radio_dish_tcp_poll_ipv6:PASS tests/test_radio_dish.cpp:520:test_radio_dish_udp_ipv4:PASS tests/test_radio_dish.cpp:521:test_radio_dish_udp_ipv6:PASS tests/test_radio_dish.cpp:523:test_radio_dish_mcast_ipv4:PASS tests/test_radio_dish.cpp:498:test_radio_dish_no_loop_ipv4:FAIL: Expected -1 Was 7 tests/test_radio_dish.cpp:431:test_radio_dish_mcast_ipv6:IGNORE: No multicast available tests/test_radio_dish.cpp:431:test_radio_dish_no_loop_ipv6:IGNORE: No multicast available


16 Tests 1 Failures 2 Ignored FAIL FAIL tests/test_radio_dish (exit status: 1)

What's the expected result?

Test not failing or test skipped.

spchamp commented 7 months ago

Could it be if ZMQ_MULTICAST_LOOP may not have actually been False at the time?

When building test_radio_dish on openSUSE, probably due to limitations of the networking stack in the virtual machine where the build is being produced, it's failing earlier in this test file when testing if multicast is available. Here, it fails with time out before beginning test_radio_dish_mcast_ipv4() seemingly unable to determine if multicast support is or is not available in the virtual machine. It's probably a separate issue albeit. This machine's networking configuration is a little awkward, not a bug in zmq of course though I wish the test would not time out here.

I see that the test that fails above is not reached here.

spchamp commented 7 months ago

For what it's worth, I was able to build and test the draft socket support on a remote host with openSUSE 15.5, under a user-contributed set of RPM packages for the openSUSE Leap 15 series of releases, mainly 15.5. There's a separate set of package built specifically with the draft support, independent to the conventional packages under the openSUSE release model

The radio dish test passes there:

[  139s] make[3]: Entering directory '/home/abuild/rpmbuild/BUILD/zeromq-4.3.5/build_draft'
[...]
[  178s] PASS: tests/test_radio_dish
[...]
[  205s] ============================================================================
[  205s] Testsuite summary for zeromq 4.3.5
[  205s] ============================================================================
[  205s] # TOTAL: 133
[  205s] # PASS:  114
[  205s] # SKIP:  19
[  205s] # XFAIL: 0
[  205s] # FAIL:  0
[  205s] # XPASS: 0
[  205s] # ERROR: 0
[  205s] ============================================================================
[  205s] make[3]: Leaving directory '/home/abuild/rpmbuild/BUILD/zeromq-4.3.5/build_draft'

Albeit I'm still working out the details of the packaging. The tests have passed, however.

Regardless of the quirks of the networking configuration on my openSUSE virtual machine, it looks like the tests have built successfully on a Linux lol.

I'm not certain if the toolchain could make any difference in the runtime for the tests? The contrib packages are built with g++ from GCC 12 and libunwind

pufferbatterie commented 6 months ago

fails too on v4.3.5 branch via included Dockerfile based on debian buster (ifcontainer has a ipv6 address) tests/test_radio_dish.cpp:499:test_radio_dish_no_loop_ipv6:FAIL: Expected -1 Was 7