One could certainly reorder the elements of the snapshot name so '-off' is the last part but it's not always natural.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- For now this is just for the TestBot administrator convenience but a later patch will make the snapshot name parsing more modular and the flags (including -off) will be position independent. So ShutDown() will be ready when then. --- testbot/bin/LibvirtTool.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testbot/bin/LibvirtTool.pl b/testbot/bin/LibvirtTool.pl index 681223f11c..f14d54cd3b 100755 --- a/testbot/bin/LibvirtTool.pl +++ b/testbot/bin/LibvirtTool.pl @@ -284,7 +284,7 @@ sub ShutDown() { my $Domain = $VM->GetDomain(); my $CurrentSnapshot = $Domain->GetSnapshotName(); - if (!defined $CurrentSnapshot or $CurrentSnapshot !~ /-off$/ or + if (!defined $CurrentSnapshot or $CurrentSnapshot !~ /-off\b/ or !$Domain->IsPoweredOn()) { return 1;