nixos/tests: Ignore shutdown/crash if not booted
Condition seems to be inverted. Crash and shutdown only make sense, when
the machine is booted; i.e. we return immediately otherwise.
In the Perl test driver this is:
return unless $self->{booted};
This commit is contained in:
@@ -611,14 +611,14 @@ class Machine:
|
|||||||
self.log("QEMU running (pid {})".format(self.pid))
|
self.log("QEMU running (pid {})".format(self.pid))
|
||||||
|
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
if self.booted:
|
if not self.booted:
|
||||||
return
|
return
|
||||||
|
|
||||||
self.shell.send("poweroff\n".encode())
|
self.shell.send("poweroff\n".encode())
|
||||||
self.wait_for_shutdown()
|
self.wait_for_shutdown()
|
||||||
|
|
||||||
def crash(self):
|
def crash(self):
|
||||||
if self.booted:
|
if not self.booted:
|
||||||
return
|
return
|
||||||
|
|
||||||
self.log("forced crash")
|
self.log("forced crash")
|
||||||
|
|||||||
Reference in New Issue
Block a user