test-network: wait for a while if manual policy is always-{up,down}
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 27 Jan 2022 22:29:32 +0000 (07:29 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 27 Jan 2022 22:29:37 +0000 (07:29 +0900)
commit073ad7ed1f335f5c1c2a910dfb1e44b4be37bad8
tree78462b76634ff6514a148c9f210cd0ffd252ef61
parentebb5036ff2e10d965264ff5868ff4af41548ef58
test-network: wait for a while if manual policy is always-{up,down}

If wait_operstate() is called super quickly after ip command, then the
up/down state may not be changed and propagated to networkd, and
wait_operstate() mistakenly pass with the previous state.

To avoid such situation, wait for a while to make networkd actually
detect the interface brought up/down.
test/test-network/systemd-networkd-tests.py