* mustFail -> fail.
* Added a function to crash a VM. svn path=/nixos/branches/boot-order/; revision=22200
This commit is contained in:
parent
b56b4c22d5
commit
483c322a62
|
@ -294,7 +294,7 @@ sub waitUntilFails {
|
|||
}
|
||||
|
||||
|
||||
sub mustFail {
|
||||
sub fail {
|
||||
my ($self, $command) = @_;
|
||||
my ($status, $out) = $self->execute($command);
|
||||
die "command `$command' unexpectedly succeeded"
|
||||
|
@ -302,6 +302,11 @@ sub mustFail {
|
|||
}
|
||||
|
||||
|
||||
sub mustFail {
|
||||
fail @_;
|
||||
}
|
||||
|
||||
|
||||
# Wait for an Upstart job to reach the "running" state.
|
||||
sub waitForJob {
|
||||
my ($self, $jobName) = @_;
|
||||
|
@ -360,6 +365,16 @@ sub shutdown {
|
|||
}
|
||||
|
||||
|
||||
sub crash {
|
||||
my ($self) = @_;
|
||||
return unless $self->{booted};
|
||||
|
||||
$self->sendMonitorCommand("quit");
|
||||
|
||||
$self->waitForShutdown;
|
||||
}
|
||||
|
||||
|
||||
# Make the machine unreachable by shutting down eth1 (the multicast
|
||||
# interface used to talk to the other VMs). We keep eth0 up so that
|
||||
# the test driver can continue to talk to the machine.
|
||||
|
|
Loading…
Reference in New Issue