Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions libvirt/tests/src/virsh_cmd/domain/virsh_domjobinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,14 @@ def cmp_jobinfo(result, info_list, job_type, actions):
else:
process = get_subprocess(action, vm_name, tmp_pipe, None)

try:
_, stderr = process.communicate(timeout=6)
if process.returncode:
os.unlink(tmp_pipe)
test.error('Background cmd met unexpected failure of %s, abort the test.' % stderr)
except subprocess.TimeoutExpired:
logging.debug("Background cmd is still running.")

f = open(tmp_pipe, 'rb')
dummy = f.read(1024 * 1024).decode(locale.getpreferredencoding(), 'ignore')

Expand Down