From 8d9ce6aa45a9a0bc08b18c04448de646747b36b1 Mon Sep 17 00:00:00 2001 From: misuzu Date: Wed, 4 Dec 2024 20:16:43 +0200 Subject: [PATCH] nixos/tests/networking: fix flaky scripted.dhcpSimple test The underlying issue is unknown, but starting the router first and then the client makes the test not flaky. (cherry picked from commit 92df50f4d045a9e1ae98642934bcf2b1c7fa5f56) --- nixos/tests/networking/networkd-and-scripted.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nixos/tests/networking/networkd-and-scripted.nix b/nixos/tests/networking/networkd-and-scripted.nix index 1b6c12eb58b7..934943b8707c 100644 --- a/nixos/tests/networking/networkd-and-scripted.nix +++ b/nixos/tests/networking/networkd-and-scripted.nix @@ -120,12 +120,13 @@ let }; }; testScript = '' - start_all() - - client.wait_for_unit("network.target") + router.start() router.systemctl("start network-online.target") router.wait_for_unit("network-online.target") + client.start() + client.wait_for_unit("network.target") + with subtest("Wait until we have an ip address on each interface"): client.wait_until_succeeds("ip addr show dev enp1s0 | grep -q '192.168.1'") client.wait_until_succeeds("ip addr show dev enp1s0 | grep -q 'fd00:1234:5678:1:'")