Skip to content

Commit

Permalink
Merge pull request #3768 from qingwangrh/2217301_fix_pci_search_pattern
Browse files Browse the repository at this point in the history
device_bit_check:fix pci search pattern
  • Loading branch information
XueqiangWei committed Aug 7, 2023
2 parents fb68299 + 97e286e commit 035bab0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions qemu/tests/cfg/device_bit_check.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@
virtio_blk:
dev_param_name = blk_extra_params
blk_extra_params = ""
pci_id_pattern = "(\d+:\d+\.\d+)\s+SCSI storage controller:.*?Virtio block device"
pci_id_pattern = "(\d+:\d+\.\d+).*?1af4:(?:1001|1042)"
dev_type = "virtio-blk-.*"
virtio_scsi:
dev_param_name = bus_extra_params
bus_extra_params = ""
pci_id_pattern = "(\d+:\d+\.\d+)\s+SCSI storage controller:.*?Virtio SCSI"
pci_id_pattern = "(\d+:\d+\.\d+).*?1af4:(?:1004|1048)"
dev_type = "virtio-scsi-.*"
s390x:
ccw_id_pattern = "\d+\.\d+\."
- nic_device:
only virtio_net
nic_extra_params = ""
pci_id_pattern = "(\d+:\d+\.\d+)\s+Ethernet controller:.*?Virtio network device"
pci_id_pattern = "(\d+:\d+\.\d+).*?1af4:(?:1000|1041)"
dev_type = "virtio-net-.*"
dev_param_name = nic_extra_params
2 changes: 1 addition & 1 deletion qemu/tests/device_bit_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def run(test, params, env):
test.error("Can't get the ccw id for device")
cmd = "cat /sys/bus/ccw/devices/%s/" % ccw_n[0]
else:
pci_info = session.cmd_output("lspci")
pci_info = session.cmd_output("lspci -n")
pci_n = re.findall(pci_id_pattern, pci_info)
if not pci_n:
test.error("Can't get the pci id for device")
Expand Down

0 comments on commit 035bab0

Please sign in to comment.