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};
commitafbfef93a7a66e8faf9f16481eb4314106b504b0
authorDaniel Schaefer <git@danielschaefer.me>
dateWed 6 Nov 2019, 16:06 (7 years ago)
parenta1a4484
nixos/lib/test-driver/test-driver.py+2−2
@@ -611,14 +611,14 @@ class Machine:
611611 self.log("QEMU running (pid {})".format(self.pid))
612612
613613 def shutdown(self):
614− if self.booted:
614+ if not self.booted:
615615 return
616616
617617 self.shell.send("poweroff\n".encode())
618618 self.wait_for_shutdown()
619619
620620 def crash(self):
621− if self.booted:
621+ if not self.booted:
622622 return
623623
624624 self.log("forced crash")