diff --git a/tests/firewall.nix b/tests/firewall.nix index 82071e2d0407..d2d2568f1cdd 100644 --- a/tests/firewall.nix +++ b/tests/firewall.nix @@ -27,6 +27,7 @@ $walled->waitForJob("firewall"); $walled->waitForJob("httpd"); + $attacker->waitForJob("network-interfaces"); # Local connections should still work. $walled->succeed("curl -v http://localhost/ >&2"); diff --git a/tests/login.nix b/tests/login.nix index 47649b47afc1..3567b6bc246f 100644 --- a/tests/login.nix +++ b/tests/login.nix @@ -35,11 +35,11 @@ # Check whether ConsoleKit/udev gives and removes device # ownership as needed. subtest "device permissions", sub { + $machine->fail("getfacl /dev/snd/timer | grep -q alice"); $machine->succeed("chvt 1"); - $machine->sleep(1); # urgh - $machine->succeed("getfacl /dev/snd/timer | grep -q alice"); + $machine->waitUntilSucceeds("getfacl /dev/snd/timer | grep -q alice"); $machine->succeed("chvt 2"); - $machine->sleep(1); # urgh + $machine->sleep(2); # urgh $machine->fail("getfacl /dev/snd/timer | grep -q alice"); }; diff --git a/tests/nat.nix b/tests/nat.nix index 80a395dc1233..5466106a43dd 100644 --- a/tests/nat.nix +++ b/tests/nat.nix @@ -41,10 +41,12 @@ # The router should have access to the server. $server->waitForJob("httpd"); + $router->waitForJob("network-interfaces"); $router->succeed("curl --fail http://server/ >&2"); # The client should be also able to connect via the NAT router. $router->waitForJob("nat"); + $client->waitForJob("network-interfaces"); $client->succeed("curl --fail http://server/ >&2"); $client->succeed("ping -c 1 server >&2"); diff --git a/tests/tomcat.nix b/tests/tomcat.nix index a6a60ba72fc3..bf601e834e1e 100644 --- a/tests/tomcat.nix +++ b/tests/tomcat.nix @@ -25,7 +25,8 @@ $server->waitForJob("tomcat"); $server->sleep(30); # Dirty, but it takes a while before Tomcat handles to requests properly - $client->mustSucceed("curl --fail http://server/examples/servlets/servlet/HelloWorldExample"); - $client->mustSucceed("curl --fail http://server/examples/jsp/jsp2/simpletag/hello.jsp"); + $client->waitForJob("network-interfaces"); + $client->succeed("curl --fail http://server/examples/servlets/servlet/HelloWorldExample"); + $client->succeed("curl --fail http://server/examples/jsp/jsp2/simpletag/hello.jsp"); ''; }