What would it take to run SocketCAN tests on a Buildbot?

While working on adding J1939 socket support, I discovered that one of the SocketCAN tests had been broken 3 years ago, but the breakage somehow went unnoticed until I ran the test locally. I would have expected for this to come up fairly quickly in the Buildbot, which leads me to believe that these tests are currently not run.

Here’s the relevant snippet from the test:

# class SocketCANTest(unittest.TestCase):
# ...
    def setUp(self):
        self.s = socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW)
        except OSError:
            self.skipTest('network interface `%s` does not exist' %
# ...

From what I understand, the Buildbot cluster runs after commits are merged (or on some set schedule). As these SocketCAN tests rely on a network interface being available, they’re presumably always skipped (since the test skips them if a vcan device isn’t found, as SocketCAN isn’t available on every platform).

Setting up a virtual SocketCAN interface doesn’t need any additional hardware on Linux, as drivers were mainlined and are present after Linux 2.6.25+:

# Load the vcan kernel module
sudo modprobe vcan
# Add a vcan device called vcan0
sudo ip link add dev vcan0 type vcan
# Set up the vcan0 device
sudo ip link set up vcan0

Are the SocketCAN tests actually being run on the Buildbot cluster? If not, are there any technical reasons why a vcan interface can’t be set up such that these could run? It would be nice to have these tests protected under Buildbot as well to prevent these test breakages in the future.

The buildbot instances are contributed and managed by volunteers. I’ve posted a link to this page to the buildbot-status mailing list in the hopes that at least one of the Linux buildbot owners will be able to configure the device on their buildbot.