networkd-test.py: fix interface state checker
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 22 Nov 2024 18:32:34 +0000 (03:32 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 23 Nov 2024 08:33:43 +0000 (17:33 +0900)
commit9e05e3387153daa3c3b7ce77e99a1d75fd8b7a2a
tree9ee9fffcbfd5dc425242649086bf808c3a06a491
parent95116bdfd5d45cc1a7c6588e6b8bdcb0d0e007a6
networkd-test.py: fix interface state checker

After 259125d53d98541623b69e83000b5543f2352f5e, network interfaces
declared by .netdev files are created after systemd-networkd sends READY
notification. So, even when networkd is started, the netdevs may not
be created yet, and 'ip' command may fail. Let's also check the return
code of the command.

This also
- drops never worked stdout checks,
- makes the test fail if the interface is not created within the timeout.
test/networkd-test.py