Skip to content

Commit

Permalink
Merge pull request autotest#5492 from smitterl/stabilize_at_dt_iscsi
Browse files Browse the repository at this point in the history
at_dt_iscsi_disk: fix disk_discovery
  • Loading branch information
chunfuwen authored Mar 14, 2024
2 parents 7b2505c + 1b33ab7 commit da83ff7
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions libvirt/tests/src/virtual_disks/at_dt_iscsi_disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from aexpect import ShellError

from avocado.core.exceptions import TestError
from avocado.utils import process

from virttest import virsh
Expand All @@ -16,6 +17,7 @@
from virttest.remote import LoginError
from virttest.virt_vm import VMError
from virttest.utils_test import libvirt
from virttest.utils_libvirt import libvirt_disk
from virttest.libvirt_xml import vm_xml
from virttest.libvirt_xml import pool_xml
from virttest.libvirt_xml.secret_xml import SecretXML
Expand Down Expand Up @@ -386,13 +388,10 @@ def find_attach_disk(expect=True):
# recognize the hotplugged disk on PPC
if on_ppc:
time.sleep(10)
cmd = "grep %s /proc/partitions" % disk_target
s, o = session.cmd_status_output(cmd)
logging.info("%s output: %s", cmd, o)
session.close()
if s == 0:
found_disk = True
except (LoginError, VMError, ShellError) as e:
disk, _ = libvirt_disk.get_non_root_disk_name(session)
logging.debug("Found new disk in VM as %s", disk)
found_disk = True
except (LoginError, VMError, ShellError, TestError) as e:
logging.error(str(e))
if found_disk == expect:
logging.debug("Check disk inside the VM PASS as expected")
Expand Down

0 comments on commit da83ff7

Please sign in to comment.