Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: TIPC availability check is too strict #2977

Merged
merged 3 commits into from
Mar 9, 2018
Merged

Conversation

bluca
Copy link
Member

@bluca bluca commented Mar 7, 2018

Solution: at build time only check if the API is available. In the tests
do a first check and a skip if the functionality is not available.

TIPC needs an in-tree but not loaded by default kernel module, tipc.ko
to be loaded, which requires root, so it is unlikely to be available on
any build system by default.
This will allow most distributions to ship with TIPC support built in,
and to avoid tests failure if the module is not there.

Also add a CI job on Travis and have CMake mark tests as skipped if they return 77 (like autotools does).

@eponsko what do you think?

Solution: set property to let it mark the test as skipped as intended
Solution: at build time only check if the API is available. In the tests
do a first check and a skip if the functionality is not available.

TIPC needs an in-tree but not loaded by default kernel module, tipc.ko
to be loaded, which requires root, so it is unlikely to be available on
any build system by default.
This will allow most distributions to ship with TIPC support built in,
and to avoid tests failure if the module is not there.
Solution: mark one job with sudo: required and load the kernel module
@bluca
Copy link
Member Author

bluca commented Mar 9, 2018

Ping?

@eponsko
Copy link
Contributor

eponsko commented Mar 9, 2018

Oop sorry, missed this. Sounds like a good idea, I guess a portable way to test whether TIPC is available is to try to create a TIPC socket and check if it works. (Noticed now that this is the approach taken in ZMQSourceRunChecks.cmake:183, which also attempts to connect to the local topology server provided by TIPC).

What would be needed is then just to add the check to all the TIPC tests and return -77 if it fails?

@bluca
Copy link
Member Author

bluca commented Mar 9, 2018

Yes - that's what I've done if you check the diff. Rather than using directly the bsd socket api though I create a zmq socket, since the code snippet is much shorter. If you check the Travis run, it seems to be working fine (build 3745.13 is enabled, all the other Linux ones are skipped, the OSX/Windows ones are not built at all)

@eponsko
Copy link
Contributor

eponsko commented Mar 9, 2018

Ah yeah, I didn't see the commits, I thought that I was expected to do the work :-)
Great, I would accept the pull request if I could!

@bluca
Copy link
Member Author

bluca commented Mar 9, 2018

@sigiesec ping

@sigiesec sigiesec merged commit 1906034 into zeromq:master Mar 9, 2018
@bluca bluca deleted the tipc branch March 9, 2018 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants