[tools 1/3] testbot/LibvirtTool: Do not require '-off' to be at the end of the snapshot name.

Francois Gouget fgouget at codeweavers.com
Thu Feb 10 12:51:42 CST 2022


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 at 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;
-- 
2.30.2




More information about the wine-devel mailing list