systemd-udevd appears to drastically increase
Mininet startup time.
With systemd-udevd disabled,
mn --topo single,100 --test none
takes 8s rather than 40s (31s with NM_UNMANAGED) on
my test VM.
We need a way of disabling it globally and always for
Mininet interfaces, but this is a start for github
actions at least.
For now, we execute this command before running the CI tests:
systemctl stop systemd-udevd systemd-udevd-kernel.socket \
systemd-udevd-control.socket
We also restore the "slow" examples tests, including
test_tree1024.
52 lines
1.6 KiB
YAML
52 lines
1.6 KiB
YAML
|
|
name: mininet-tests
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
test:
|
|
name: Mininet Tests
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-22.04, ubuntu-20.04]
|
|
py: [python3, python2]
|
|
steps:
|
|
- name: Check out Mininet source
|
|
uses: actions/checkout@v3
|
|
- name: Install Python ${{ matrix.py }}
|
|
run: sudo apt install ${{ matrix.py }}
|
|
- name: Install Mininet and base dependencies
|
|
run: |
|
|
sudo apt-get update -qq
|
|
# This seems too slow unfortunately:
|
|
# sudo apt-get upgrade -y -qq
|
|
PYTHON=${{ matrix.py }} util/install.sh -nv
|
|
- name: Disable slow udevd
|
|
run: sudo systemctl stop systemd-udevd
|
|
systemd-udevd-kernel.socket
|
|
systemd-udevd-control.socket
|
|
|| echo "couldn't disable udevd"
|
|
- name: Sanity test
|
|
run: |
|
|
export sudo="sudo env PATH=$PATH"
|
|
export PYTHON=${{ matrix.py }}
|
|
# Newer OvS tries OpenFlow15 which crashes ovsc on ubuntu-20.04
|
|
$sudo mn --switch ovs,protocols=OpenFlow13 --test pingall
|
|
- name: Install test dependencies
|
|
run: |
|
|
sudo apt-get install -qq vlan
|
|
export PYTHON=${{ matrix.py }}
|
|
sudo $PYTHON -m pip install pexpect
|
|
util/install.sh -fw
|
|
- name: Run core tests
|
|
run: |
|
|
export sudo="sudo env PATH=$PATH"
|
|
export PYTHON=${{ matrix.py }}
|
|
$sudo $PYTHON mininet/test/runner.py -v
|
|
- name: Run examples tests
|
|
run: |
|
|
export sudo="sudo env PATH=$PATH"
|
|
export PYTHON=${{ matrix.py }}
|
|
$sudo $PYTHON examples/test/runner.py -v
|