]> git.ipfire.org Git - thirdparty/systemd.git/commit - test/test-network/systemd-networkd-tests.py
test-network: wait for the link is activated
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 27 Jan 2022 22:02:00 +0000 (07:02 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 27 Jan 2022 22:02:03 +0000 (07:02 +0900)
commitcfbdc4387f97f6c50709c72b924cb53d2128d75c
treed4422108bec2286112919c2013ee0f28f538ad1a
parentb67f3d73b075346c6e06533111ec8f6b6ac617d7
test-network: wait for the link is activated

This fixes the following race:
1. when a dummy interface is created, it is initially down state,
2. hence, wait_operstate() may pass before the link is activated,
3. and the ip command bring up the interface before the activation,
4. and networkd activates, that is, brings down the interface,
5. thus, next wait_operstate() timedout, as it waits for the interface up.

To fix the race, let's wait the link is activated, before enter the loop
of wait_operstate().

Fixes #22267.
test/test-network/systemd-networkd-tests.py