Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upProblem: TIPC availability check is too strict #2977
Conversation
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
Solution: set property to let it mark the test as skipped as intended
|
Ping? |
|
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? |
|
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) |
|
Ah yeah, I didn't see the commits, I thought that I was expected to do the work :-) |
|
@sigiesec ping |
bluca commentedMar 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?