Skip to content

Commit 9d3267b

Browse files
committed
vfio/ccw: increase wait time for CRW operations
With 1 seconds the observed behavior still reproduces; try with 2. Signed-off-by: Sebastian Mitterle <[email protected]>
1 parent 58b3087 commit 9d3267b

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

libvirt/tests/src/virtual_disks/virtual_disks_dasd.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ def try_enable_disk(disk_id):
5050

5151
cmd = "lszdev --online %s" % disk_id
5252
err, _ = cmd_status_output(cmd, shell=True)
53-
if err: # device not online
53+
if err: # device not online
5454
logging.debug(cmd_status_output("lscss -t 3390")[1])
5555
cmd = "chzdev -e %s" % disk_id
5656
err, out = cmd_status_output(cmd, shell=True)
57-
logging.debug("Sleep for 1 sec accounting for delayed CRW.")
58-
time.sleep(1)
57+
logging.debug("Wait to account for delayed CRW.")
58+
time.sleep(2)
5959
logging.debug(cmd_status_output("lscss -t 3390")[1])
6060
if err:
6161
raise TestError(f"Couldn't set device online: {out}")
@@ -73,8 +73,8 @@ def disable_disk(disk_id):
7373
logging.debug(cmd_status_output("lscss -t 3390")[1])
7474
cmd = "chzdev -d %s" % disk_id
7575
err, out = cmd_status_output(cmd, shell=True)
76-
logging.debug("Sleep for 1 sec accounting for delayed CRW.")
77-
time.sleep(1)
76+
logging.debug("Wait to account for delayed CRW.")
77+
time.sleep(2)
7878
logging.debug(cmd_status_output("lscss -t 3390")[1])
7979
if err:
8080
raise TestError("Couldn't disable dasd '%s'. %s" % (disk_id, out))

provider/vfio/ccw.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ def set_device_offline(device_id, session=None):
161161
logging.debug(cmd_status_output("lscss -t 3390")[1])
162162
cmd = "chccwdev -d %s" % device_id
163163
err, out = cmd_status_output(cmd, shell=True, session=session)
164-
logging.debug("Wait for 1 second to account for delayed CRW.")
165-
time.sleep(1)
164+
logging.debug("Wait to account for delayed CRW.")
165+
time.sleep(2)
166166
logging.debug(cmd_status_output("lscss -t 3390")[1])
167167
if err:
168168
raise TestError("Could not set device offline. %s" % out)
@@ -180,8 +180,8 @@ def set_device_online(device_id, session=None):
180180
logging.debug(cmd_status_output("lscss -t 3390")[1])
181181
cmd = "chccwdev -e %s" % device_id
182182
err, out = cmd_status_output(cmd, shell=True, session=session)
183-
logging.debug("Wait for 1 second to account for delayed CRW.")
184-
time.sleep(1)
183+
logging.debug("Wait to account for delayed CRW.")
184+
time.sleep(2)
185185
logging.debug(cmd_status_output("lscss -t 3390")[1])
186186
if err:
187187
raise TestError("Could not set device online. %s" % out)
@@ -246,8 +246,8 @@ def set_override(schid):
246246
logging.debug(cmd_status_output("lscss -t 3390")[1])
247247
cmd = "driverctl -b css set-override %s vfio_ccw" % schid
248248
err, out = cmd_status_output(cmd, shell=True)
249-
logging.debug("Wait for 1 second to account for delayed CRW.")
250-
time.sleep(1)
249+
logging.debug("Wait to account for delayed CRW.")
250+
time.sleep(2)
251251
logging.debug(cmd_status_output("lscss -t 3390")[1])
252252
if err:
253253
raise TestError("Can't set driver override. %s" % out)
@@ -264,8 +264,8 @@ def unset_override(schid):
264264
logging.debug(cmd_status_output("lscss -t 3390")[1])
265265
cmd = "driverctl -b css unset-override %s" % schid
266266
err, out = cmd_status_output(cmd, shell=True)
267-
logging.debug("Wait for 1 second to account for delayed CRW.")
268-
time.sleep(1)
267+
logging.debug("Wait to account for delayed CRW.")
268+
time.sleep(2)
269269
logging.debug(cmd_status_output("lscss -t 3390")[1])
270270
if err:
271271
raise TestError("Can't unset driver override. %s" % out)

0 commit comments

Comments
 (0)