This repository was archived by the owner on Jan 22, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919import shlex
2020import subprocess
2121import sys
22+ import time
2223import traceback
2324import unittest
2425import StringIO
@@ -1254,6 +1255,17 @@ def _launch_command(self):
12541255 proc .kill ()
12551256 break
12561257
1258+ exited = False
1259+ for i in range (30 ):
1260+ if proc .poll () is not None :
1261+ exited = True
1262+ break
1263+ time .sleep (.1 )
1264+
1265+ if not exited :
1266+ proc .kill ()
1267+ out += "\n Process was killed by test harness"
1268+
12571269 return proc .wait (), out
12581270
12591271
@@ -1310,6 +1322,14 @@ def _launch_command(self):
13101322p6 .add ("use as the cloned disk" , "%(NEWIMG2)s" )
13111323promptlist .append (p6 )
13121324
1325+ # Basic virt-clone prompting with disk failure handling
1326+ p7 = PromptTest ("virt-clone --connect %(TESTURI)s --prompt --quiet "
1327+ "--clone-running -o test-clone-simple -n test-clone-new" )
1328+ p7 .add ("use as the cloned disk" , "/root" )
1329+ p7 .add ("'/root' must be a file or a device" )
1330+ p7 .add ("use as the cloned disk" , "%(MANAGEDNEW1)s" )
1331+ promptlist .append (p7 )
1332+
13131333
13141334#########################
13151335# Test runner functions #
Original file line number Diff line number Diff line change @@ -708,7 +708,8 @@ def prompt_size_conflict(dev):
708708 # If we fail within the loop, reprompt for size and path
709709 if not retry_path :
710710 origpath = None
711- origsize = None
711+ if not path_to_clone :
712+ origsize = None
712713 retry_path = False
713714
714715 # Get disk path
You can’t perform that action at this time.
0 commit comments