-
Notifications
You must be signed in to change notification settings - Fork 633
CI skips some of the SocketCAN unit tests #1479
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
Comments
I'm no linux expert, but i think the problem is, that the github actions runner images do not contain the vcan module |
You are correct. I did some testing, and Microsoft does not ship the vcan module with their Azure kernels. And it doesn't look like this is something they would like to change. |
Is the repository cache reliable? Can we assume, that it will not be cleaned randomly? The windows pypy tests currently take ~5min. CC @hartkopp |
There are two possible scenarios:
The former can be done by a periodic workflow trigger to run once a day. The following is from the GitHub doc:
So I think the cache shouldn't be an issue. The workflow that I wrote is is basically a shell script anyways. So this could easily be converted. But we need to be aware that this is likely going to be more maintenance intensive since the kernel module compilation has a lot of moving parts. I would also like to hear what @hartkopp has to say about this. |
That's really bad that Microsoft does not ship the vcan driver. What can you do with CAN network layer support without a CAN driver?!? :-D Looking into @lumagi 's workflow script I wonder if we could speed up the kernel download/unpack/compile process by simply picking the correct Ubuntu modules from the Ubuntu kernel repositories at https://kernel.ubuntu.com/ E.g. in
Then unpack the deb package with
And then the |
Just checked where to find Azure Kernel packages. https://packages.ubuntu.com/focal/amd64/linux-modules-extra-5.15.0-1029-azure/download The question is, whether you could simply install the |
You are correct, the module is contained in the package I am able to bring up CAN interfaces afterwards. That is definitely the simplest solution. In essence, the following should suffice:
|
I can confirm, that it works: https://github.com/zariiii9003/python-can/actions/runs/3876181524/jobs/6609703648 |
Oh, it's interesting that PyPy seems to have a problem with Edit: |
I can't see the logs anymore, but it looks like the pypy tests ran without socketcan: If PyPy does not support it, we can run the tests on cpython only. |
Yes, I faintly remember something there :D I will write a PR over the next couple of days. |
Et voilà, work has begun #1484. I still need to investigate why that one test fails for CPython, though. |
Closed with PR #1484. |
Describe the bug
The SocketCAN tests are only executed when the environment variable
TEST_SOCKETCAN
is present. The variable was likely introduced in the Travis CI environment and passed into test execution via tox. I noticed that it is no longer present in the current GitHub Workflow CI environment. This causes several of the SocketCAN tests to be skipped.Updating the pipeline would include two things:
test/open_vcan.sh
on Linux machinesTEST_SOCKETCAN
or removing it and simply executing these tests for all Linux systemsI know that workflow scripts have root permission on the GitHub runners. But I wasn't able to check if they also have capability
NET_ADMIN
to open vcan interfaces. Additionally, I wasn't sure if I could and didn't want to open a PR and mess with the workflow pipeline before opening an issue first. @zariiii9003 was the variable removed on purpose? If not, I can volunteer a patch, but I wanted to ask for some feedback first.The text was updated successfully, but these errors were encountered: