aboutsummaryrefslogtreecommitdiff
path: root/bbot/machine.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-05-01 11:53:04 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-05-01 11:53:04 +0200
commit8b896055d4d90b538211784cf9ad1bf335b20dc6 (patch)
tree755ca33df640a4a29e1d00c7e2e0265a4243bb94 /bbot/machine.hxx
parentc06600bc5e24389453d9a486c69d9746ae4fef23 (diff)
Soft-fail on VM forcedown failures
Since we've got the result this should be harmless. And should help with spurious KVM crashes with Mac OS guest.
Diffstat (limited to 'bbot/machine.hxx')
-rw-r--r--bbot/machine.hxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/bbot/machine.hxx b/bbot/machine.hxx
index 9ea0d48..c15d618 100644
--- a/bbot/machine.hxx
+++ b/bbot/machine.hxx
@@ -15,6 +15,8 @@ namespace bbot
// Note that if the machine is destroyed while it is still running, the
// destructor will block until the machine process terminates.
//
+ // Some functions can fail softly if the fail_hard argument is false.
+ //
class machine
{
public:
@@ -29,7 +31,7 @@ namespace bbot
// Force the machine down.
//
virtual void
- forcedown () = 0;
+ forcedown (bool fail_hard = true) = 0;
// Suspend the machine.
//
@@ -42,13 +44,13 @@ namespace bbot
// otherwise.
//
virtual bool
- wait (size_t& seconds) = 0;
+ wait (size_t& seconds, bool fail_hard = true) = 0;
bool
- wait ()
+ wait (bool fail_hard = true)
{
size_t sec (~0); // Wait indefinitely.
- return wait (sec);
+ return wait (sec, fail_hard);
}
// Print information about the machine (as info diagnostics) that can be