Quantcast
Channel: Active questions tagged zeromq - Stack Overflow
Viewing all articles
Browse latest Browse all 208

how to conditionally diable multicast tests, builiding and testing libzmq with cmake?

$
0
0

When building a recent release of libzmq for a branch in the openSUSE build system, with ZMQ draft features enabled (e.g radio/dish, client/server sockets) I've fetched the latest sources for the build and patched the build to use cmake.

Presently, using the newset libzmq sources available, the build is succeeding except for one test. The test file is trying to check for the availability of IPv4 and/or IPv6 multicasting, as a conditional test before running any tests using multicasting with the radio/dish ZMQ socket types.

In so much as the test for IP multicast availability, it seems to be failing here in the virtual machine where the build is being produced. The other tests all succeed, but the test is persistently timing out before either starting or skipping the multicast test.

Candidly this build is being produced as a build dependency for a local pyzmq installation, in which I'd like to be able to test the ZMQ draft socket types, in Python and on this openSUSE host. I'm trying to work out the patch while not being well familiar with C and the C++ compiler environment. Any advice would be appreciated.

I've tried to patch the test file to add a conditional check, then using cflags to try to prevent it from entering the section where it times out. In the patched test file, I've added the following conditionals:

#ifndef NO_MULTICAST_TEST    RUN_TEST (test_radio_dish_mcast_ipv4);#endif    RUN_TEST (test_radio_dish_no_loop_ipv4);#ifndef NO_MULTICAST_TEST    RUN_TEST (test_radio_dish_mcast_ipv6);#endif    RUN_TEST (test_radio_dish_no_loop_ipv6);

I'm running the build as follows:

bash -c 'set -ex;   rm -rf build_; mkdir build_; cd build_;   export CC=gcc-12 CXX=g++-12 CFLAGS=-DNO_MULTICAST_TEST;   export CXXFLAGS="$CFLAGS";    cmake .. -GNinja -DENABLE_DRAFTS=ON -DWITH_LIBSODIUM=ON -DENABLE_CURVE=ON -DWITH_OPENPGM=ON;   ninja;   ctest -j10 --test-dir tests'

Whether my patch is faulty or my build cmd is faulty or something else, it continues to time out in test_radio_dish.

127/129 Test #111: test_radio_dish ..................***Timeout  10.01 sec

I'm fairly certain this is due to the network configuration of the virtual machine where the build is running.

When Running the test_radio_dish cmd directly, I see the following output.

$ build_/bin/test_radio_dish../tests/test_radio_dish.cpp:513:test_leave_unjoined_fails:PASS../tests/test_radio_dish.cpp:514:test_join_too_long_fails:PASS../tests/test_radio_dish.cpp:515:test_long_group:PASS../tests/test_radio_dish.cpp:516:test_join_twice_fails:PASS../tests/test_radio_dish.cpp:517:test_radio_bind_fails_ipv4:PASS../tests/test_radio_dish.cpp:518:test_radio_bind_fails_ipv6:PASS../tests/test_radio_dish.cpp:519:test_dish_connect_fails_ipv4:PASS../tests/test_radio_dish.cpp:520:test_dish_connect_fails_ipv6:PASS../tests/test_radio_dish.cpp:521:test_radio_dish_tcp_poll_ipv4:PASS../tests/test_radio_dish.cpp:522:test_radio_dish_tcp_poll_ipv6:PASS../tests/test_radio_dish.cpp:523:test_radio_dish_udp_ipv4:PASS../tests/test_radio_dish.cpp:524:test_radio_dish_udp_ipv6:PASSAlarm clock

From this output, I've assumed that the test is timing out when testing for whether to run the multicast test. There's a significant delay before the test exits with the Alarm clock message.

The other tests are all succeeding. I wonder what's faulty in my patch here?

While it might be conceivable that a multicast feature could be enabled on some virtual machines, I don't believe that's going to work out with the instance where this build is running. The VM has two virtual network adapters, one using virtualbox NAT and the other routing into an adapter on a FreeBSD netgraph bridge then over a WLAN adapter. Wither either network interface, I don't believe this host is multicast-capable.

I've configured the openSUSE/YAST firewall settings for both interfaces to use a 'home' zone, rebooted the machine, and tried again. It still times out.

It seems to be failing in this particular build configuration, even in how the test is testing for whether there's multicast support.

Is there any advice on how to fix my failing patch here?

Pursuant of a clean run with the libzmq tests, I'd like to be able to submit the patches for a user-contributed openSUSE build system package for the newer ZMQ build. Once that would be available, it should be feasible to test out the draft ZMQ socket types with a pyzmq installation on this host. Not to rush through the C++ build, I really don't know what's failing in the patch here.

Thx!


Viewing all articles
Browse latest Browse all 208

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>