networkd-tests.py: add helpers to common subprocess call patterns

For normal shell calls, python syntax is quite verbose. We don't need to punish
ourselves like that. In some places we would fork a shell to do argument splitting
for us. We know that our arguments can be safely split on whitespace, so let's do
that ourselves in all cases, without forking a shell.

We also expect command output to be valid text, so let's always set
universal_newlines=True.

This makes things shorter and easier to read. Development is also easier because
it's possible to paste many of the commands directly to/from a shell.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2019-06-05 11:43:28 +02:00
parent 632037cf4a
commit 371810d18a
1 changed files with 235 additions and 224 deletions

File diff suppressed because it is too large Load Diff