Commit baaab522 authored by Thomas Haller's avatar Thomas Haller

clients/tests: run nmcli commands in parallel

Most nmcli calls from clients/tests don't change the server's state.
Hence, they can easily run in parallel.

Run tests in parallel. No longer handle one nmcli invocation after the other.
Instead, spawn groups of processes in parallel, and track the pending jobs.

Only at certain synchronization points we call self.async_wait() to
wait for all previous jobs to complete.

This reduces the test time on my machine from 7 to 3 seconds. Arguably,
that matters less during a full `make check -j 8`, because the entire
set of tests anyway takes longer than 7 seconds. So when running the
entire test suite, the machine is kept busy anyway. It matters however
for manual invocations.
parent f0cdd28d
location: clients/tests/test-client.py:586:test_001()/1
location: clients/tests/test-client.py:651:test_001()/1
cmd: $NMCLI
lang: C
returncode: 0
......
location: clients/tests/test-client.py:586:test_001()/2
location: clients/tests/test-client.py:651:test_001()/2
cmd: $NMCLI
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:588:test_001()/3
location: clients/tests/test-client.py:653:test_001()/3
cmd: $NMCLI -f AP -mode multiline -p d show wlan0
lang: C
returncode: 10
......
location: clients/tests/test-client.py:588:test_001()/4
location: clients/tests/test-client.py:653:test_001()/4
cmd: $NMCLI -f AP -mode multiline -p d show wlan0
lang: pl_PL.UTF-8
returncode: 10
......
location: clients/tests/test-client.py:590:test_001()/5
location: clients/tests/test-client.py:655:test_001()/5
cmd: $NMCLI c s
lang: C
returncode: 0
......
location: clients/tests/test-client.py:590:test_001()/6
location: clients/tests/test-client.py:655:test_001()/6
cmd: $NMCLI c s
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:592:test_001()/7
location: clients/tests/test-client.py:657:test_001()/7
cmd: $NMCLI bogus s
lang: C
returncode: 2
......
location: clients/tests/test-client.py:592:test_001()/8
location: clients/tests/test-client.py:657:test_001()/8
cmd: $NMCLI bogus s
lang: pl_PL.UTF-8
returncode: 2
......
location: clients/tests/test-client.py:600:test_001()/9
location: clients/tests/test-client.py:665:test_001()/9
cmd: $NMCLI general permissions
lang: C
returncode: 0
......
location: clients/tests/test-client.py:600:test_001()/10
location: clients/tests/test-client.py:665:test_001()/10
cmd: $NMCLI general permissions
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:600:test_001()/11
location: clients/tests/test-client.py:665:test_001()/11
cmd: $NMCLI --pretty general permissions
lang: C
returncode: 0
......
location: clients/tests/test-client.py:600:test_001()/12
location: clients/tests/test-client.py:665:test_001()/12
cmd: $NMCLI --pretty general permissions
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:600:test_001()/13
location: clients/tests/test-client.py:665:test_001()/13
cmd: $NMCLI --terse general permissions
lang: C
returncode: 0
......
location: clients/tests/test-client.py:600:test_001()/14
location: clients/tests/test-client.py:665:test_001()/14
cmd: $NMCLI --terse general permissions
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:600:test_001()/15
location: clients/tests/test-client.py:665:test_001()/15
cmd: $NMCLI --mode tabular general permissions
lang: C
returncode: 0
......
location: clients/tests/test-client.py:600:test_001()/16
location: clients/tests/test-client.py:665:test_001()/16
cmd: $NMCLI --mode tabular general permissions
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:600:test_001()/17
location: clients/tests/test-client.py:665:test_001()/17
cmd: $NMCLI --mode tabular --pretty general permissions
lang: C
returncode: 0
......
location: clients/tests/test-client.py:600:test_001()/18
location: clients/tests/test-client.py:665:test_001()/18
cmd: $NMCLI --mode tabular --pretty general permissions
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:600:test_001()/19
location: clients/tests/test-client.py:665:test_001()/19
cmd: $NMCLI --mode tabular --terse general permissions
lang: C
returncode: 0
......
location: clients/tests/test-client.py:600:test_001()/20
location: clients/tests/test-client.py:665:test_001()/20
cmd: $NMCLI --mode tabular --terse general permissions
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:600:test_001()/21
location: clients/tests/test-client.py:665:test_001()/21
cmd: $NMCLI --mode multiline general permissions
lang: C
returncode: 0
......
location: clients/tests/test-client.py:600:test_001()/22
location: clients/tests/test-client.py:665:test_001()/22
cmd: $NMCLI --mode multiline general permissions
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:600:test_001()/23
location: clients/tests/test-client.py:665:test_001()/23
cmd: $NMCLI --mode multiline --pretty general permissions
lang: C
returncode: 0
......
location: clients/tests/test-client.py:600:test_001()/24
location: clients/tests/test-client.py:665:test_001()/24
cmd: $NMCLI --mode multiline --pretty general permissions
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:600:test_001()/25
location: clients/tests/test-client.py:665:test_001()/25
cmd: $NMCLI --mode multiline --terse general permissions
lang: C
returncode: 0
......
location: clients/tests/test-client.py:600:test_001()/26
location: clients/tests/test-client.py:665:test_001()/26
cmd: $NMCLI --mode multiline --terse general permissions
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:605:test_002()/1
location: clients/tests/test-client.py:670:test_002()/1
cmd: $NMCLI d
lang: C
returncode: 0
......
location: clients/tests/test-client.py:605:test_002()/2
location: clients/tests/test-client.py:670:test_002()/2
cmd: $NMCLI d
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:607:test_002()/3
location: clients/tests/test-client.py:672:test_002()/3
cmd: $NMCLI -f all d
lang: C
returncode: 0
......
location: clients/tests/test-client.py:607:test_002()/4
location: clients/tests/test-client.py:672:test_002()/4
cmd: $NMCLI -f all d
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:609:test_002()/5
location: clients/tests/test-client.py:674:test_002()/5
cmd: $NMCLI
lang: C
returncode: 0
......
location: clients/tests/test-client.py:609:test_002()/6
location: clients/tests/test-client.py:674:test_002()/6
cmd: $NMCLI
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:611:test_002()/7
location: clients/tests/test-client.py:676:test_002()/7
cmd: $NMCLI -f AP -mode multiline d show wlan0
lang: C
returncode: 0
......
location: clients/tests/test-client.py:611:test_002()/8
location: clients/tests/test-client.py:676:test_002()/8
cmd: $NMCLI -f AP -mode multiline d show wlan0
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:612:test_002()/9
location: clients/tests/test-client.py:677:test_002()/9
cmd: $NMCLI -f AP -mode multiline -p d show wlan0
lang: C
returncode: 0
......
location: clients/tests/test-client.py:612:test_002()/10
location: clients/tests/test-client.py:677:test_002()/10
cmd: $NMCLI -f AP -mode multiline -p d show wlan0
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:613:test_002()/11
location: clients/tests/test-client.py:678:test_002()/11
cmd: $NMCLI -f AP -mode multiline -t d show wlan0
lang: C
returncode: 0
......
location: clients/tests/test-client.py:613:test_002()/12
location: clients/tests/test-client.py:678:test_002()/12
cmd: $NMCLI -f AP -mode multiline -t d show wlan0
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:614:test_002()/13
location: clients/tests/test-client.py:679:test_002()/13
cmd: $NMCLI -f AP -mode tabular d show wlan0
lang: C
returncode: 0
......
location: clients/tests/test-client.py:614:test_002()/14
location: clients/tests/test-client.py:679:test_002()/14
cmd: $NMCLI -f AP -mode tabular d show wlan0
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:615:test_002()/15
location: clients/tests/test-client.py:680:test_002()/15
cmd: $NMCLI -f AP -mode tabular -p d show wlan0
lang: C
returncode: 0
......
location: clients/tests/test-client.py:615:test_002()/16
location: clients/tests/test-client.py:680:test_002()/16
cmd: $NMCLI -f AP -mode tabular -p d show wlan0
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:616:test_002()/17
location: clients/tests/test-client.py:681:test_002()/17
cmd: $NMCLI -f AP -mode tabular -t d show wlan0
lang: C
returncode: 0
......
location: clients/tests/test-client.py:616:test_002()/18
location: clients/tests/test-client.py:681:test_002()/18
cmd: $NMCLI -f AP -mode tabular -t d show wlan0
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:618:test_002()/19
location: clients/tests/test-client.py:683:test_002()/19
cmd: $NMCLI -f ALL d wifi
lang: C
returncode: 0
......
location: clients/tests/test-client.py:618:test_002()/20
location: clients/tests/test-client.py:683:test_002()/20
cmd: $NMCLI -f ALL d wifi
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:620:test_002()/21
location: clients/tests/test-client.py:685:test_002()/21
cmd: $NMCLI c
lang: C
returncode: 0
......
location: clients/tests/test-client.py:620:test_002()/22
location: clients/tests/test-client.py:685:test_002()/22
cmd: $NMCLI c
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:622:test_002()/23
location: clients/tests/test-client.py:687:test_002()/23
cmd: $NMCLI c s con-1
lang: C
returncode: 0
......
location: clients/tests/test-client.py:622:test_002()/24
location: clients/tests/test-client.py:687:test_002()/24
cmd: $NMCLI c s con-1
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:632:test_003()/1
location: clients/tests/test-client.py:697:test_003()/1
cmd: $NMCLI c add type ethernet ifname '*' con-name con-xx1
lang: C
returncode: 0
......
location: clients/tests/test-client.py:635:test_003()/2
location: clients/tests/test-client.py:700:test_003()/2
cmd: $NMCLI c s
lang: C
returncode: 0
......
location: clients/tests/test-client.py:635:test_003()/3
location: clients/tests/test-client.py:700:test_003()/3
cmd: $NMCLI c s
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:640:test_003()/4
location: clients/tests/test-client.py:705:test_003()/4
cmd: $NMCLI c add type ethernet ifname '*'
lang: C
returncode: 0
......
location: clients/tests/test-client.py:643:test_003()/5
location: clients/tests/test-client.py:708:test_003()/5
cmd: $NMCLI c s
lang: C
returncode: 0
......
location: clients/tests/test-client.py:643:test_003()/6
location: clients/tests/test-client.py:708:test_003()/6
cmd: $NMCLI c s
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:646:test_003()/7
location: clients/tests/test-client.py:711:test_003()/7
cmd: $NMCLI -f ALL c s
lang: C
returncode: 0
......
location: clients/tests/test-client.py:646:test_003()/8
location: clients/tests/test-client.py:711:test_003()/8
cmd: $NMCLI -f ALL c s
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:650:test_003()/9
location: clients/tests/test-client.py:715:test_003()/9
cmd: $NMCLI --complete-args -f ALL c s ''
lang: C
returncode: 0
......
location: clients/tests/test-client.py:650:test_003()/10
location: clients/tests/test-client.py:715:test_003()/10
cmd: $NMCLI --complete-args -f ALL c s ''
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:663:test_003()/11
location: clients/tests/test-client.py:728:test_003()/11
cmd: $NMCLI con up ethernet ifname eth0
lang: C
returncode: 0
......
location: clients/tests/test-client.py:666:test_003()/12
location: clients/tests/test-client.py:731:test_003()/12
cmd: $NMCLI con
lang: C
returncode: 0
......
location: clients/tests/test-client.py:666:test_003()/13
location: clients/tests/test-client.py:731:test_003()/13
cmd: $NMCLI con
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:669:test_003()/14
location: clients/tests/test-client.py:734:test_003()/14
cmd: $NMCLI -f ALL con
lang: C
returncode: 0
......
location: clients/tests/test-client.py:669:test_003()/15
location: clients/tests/test-client.py:734:test_003()/15
cmd: $NMCLI -f ALL con
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:672:test_003()/16
location: clients/tests/test-client.py:737:test_003()/16
cmd: $NMCLI -f ALL con s ethernet
lang: C
returncode: 0
......
location: clients/tests/test-client.py:672:test_003()/17
location: clients/tests/test-client.py:737:test_003()/17
cmd: $NMCLI -f ALL con s ethernet
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:675:test_003()/18
location: clients/tests/test-client.py:740:test_003()/18
cmd: $NMCLI con s ethernet
lang: C
returncode: 0
......
location: clients/tests/test-client.py:675:test_003()/19
location: clients/tests/test-client.py:740:test_003()/19
cmd: $NMCLI con s ethernet
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:678:test_003()/20
location: clients/tests/test-client.py:743:test_003()/20
cmd: $NMCLI -f ALL dev s eth0
lang: C
returncode: 0
......
location: clients/tests/test-client.py:678:test_003()/21
location: clients/tests/test-client.py:743:test_003()/21
cmd: $NMCLI -f ALL dev s eth0
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:681:test_003()/22
location: clients/tests/test-client.py:746:test_003()/22
cmd: $NMCLI -f ALL dev show eth0
lang: C
returncode: 0
......
location: clients/tests/test-client.py:681:test_003()/23
location: clients/tests/test-client.py:746:test_003()/23
cmd: $NMCLI -f ALL dev show eth0
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:663:test_003()/24
location: clients/tests/test-client.py:728:test_003()/24
cmd: $NMCLI con up ethernet ifname eth1
lang: C
returncode: 0
......
location: clients/tests/test-client.py:666:test_003()/25
location: clients/tests/test-client.py:731:test_003()/25
cmd: $NMCLI con
lang: C
returncode: 0
......
location: clients/tests/test-client.py:666:test_003()/26
location: clients/tests/test-client.py:731:test_003()/26
cmd: $NMCLI con
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:669:test_003()/27
location: clients/tests/test-client.py:734:test_003()/27
cmd: $NMCLI -f ALL con
lang: C
returncode: 0
......
location: clients/tests/test-client.py:669:test_003()/28
location: clients/tests/test-client.py:734:test_003()/28
cmd: $NMCLI -f ALL con
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:672:test_003()/29
location: clients/tests/test-client.py:737:test_003()/29
cmd: $NMCLI -f ALL con s ethernet
lang: C
returncode: 0
......
location: clients/tests/test-client.py:672:test_003()/30
location: clients/tests/test-client.py:737:test_003()/30
cmd: $NMCLI -f ALL con s ethernet
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:675:test_003()/31
location: clients/tests/test-client.py:740:test_003()/31
cmd: $NMCLI con s ethernet
lang: C
returncode: 0
......
location: clients/tests/test-client.py:675:test_003()/32
location: clients/tests/test-client.py:740:test_003()/32
cmd: $NMCLI con s ethernet
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:678:test_003()/33
location: clients/tests/test-client.py:743:test_003()/33
cmd: $NMCLI -f ALL dev s eth0
lang: C
returncode: 0
......
location: clients/tests/test-client.py:678:test_003()/34
location: clients/tests/test-client.py:743:test_003()/34
cmd: $NMCLI -f ALL dev s eth0
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:681:test_003()/35
location: clients/tests/test-client.py:746:test_003()/35
cmd: $NMCLI -f ALL dev show eth0
lang: C
returncode: 0
......
location: clients/tests/test-client.py:681:test_003()/36
location: clients/tests/test-client.py:746:test_003()/36
cmd: $NMCLI -f ALL dev show eth0
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:688:test_003()/37
location: clients/tests/test-client.py:755:test_003()/37
cmd: $NMCLI -f ALL con
lang: C
returncode: 0
......
location: clients/tests/test-client.py:688:test_003()/38
location: clients/tests/test-client.py:755:test_003()/38
cmd: $NMCLI -f ALL con
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:691:test_003()/39
location: clients/tests/test-client.py:758:test_003()/39
cmd: $NMCLI -f UUID,TYPE con
lang: C
returncode: 0
......
location: clients/tests/test-client.py:691:test_003()/40
location: clients/tests/test-client.py:758:test_003()/40
cmd: $NMCLI -f UUID,TYPE con
lang: pl_PL.UTF-8
returncode: 0
......
location: clients/tests/test-client.py:694:test_003()/41