[master 13/15] edd: Fix the error case in the "absurd_virt" test.

vathpela installerbot-noreply at redhat.com
Fri Nov 6 20:00:48 UTC 2015


From: Peter Jones <pjones at redhat.com>

The problem is that SeaBIOS (and thus our qemu VMs) doesn't enumerate ata
devices separately from PCI devices.  So on a real system,
EddEntry.ata_device should reset to 0 for each new PCI device, but on a
virt running SeaBIOS, they just count up monotonically.

So do the /right/ thing when we can, and if we don't find a correct
device, try relaxing the requirement on the scsi target id in sysfs, and
see if we find the right port number anyway.

Signed-off-by: Peter Jones <pjones at redhat.com>
---
 blivet/devicelibs/edd.py                           | 137 +++++++++++------
 .../edd_data/strawberry_mountain/dev/sda           | Bin 0 -> 512 bytes
 .../edd_data/strawberry_mountain/dev/sdb           | Bin 0 -> 512 bytes
 .../edd_data/strawberry_mountain/dev/sdc           | Bin 0 -> 512 bytes
 .../edd_data/strawberry_mountain/dev/sdd           | Bin 0 -> 512 bytes
 .../edd_data/strawberry_mountain/dev/sr0           |   0
 .../edd_data/strawberry_mountain/sys/block/dm-0    |   1 +
 .../edd_data/strawberry_mountain/sys/block/dm-1    |   1 +
 .../edd_data/strawberry_mountain/sys/block/loop0   |   1 +
 .../edd_data/strawberry_mountain/sys/block/loop1   |   1 +
 .../edd_data/strawberry_mountain/sys/block/loop2   |   1 +
 .../edd_data/strawberry_mountain/sys/block/sda     |   1 +
 .../edd_data/strawberry_mountain/sys/block/sdb     |   1 +
 .../edd_data/strawberry_mountain/sys/block/sdc     |   1 +
 .../edd_data/strawberry_mountain/sys/block/sdd     |   1 +
 .../edd_data/strawberry_mountain/sys/block/sr0     |   1 +
 .../4-1.2/4-1.2:1.0/host6/scsi_host/host6/device   |   1 +
 .../host6/target6:0:0/6:0:0:0/block/sdd/device     |   1 +
 .../target6:0:0/6:0:0:0/scsi_device/6:0:0:0/device |   1 +
 .../target6:0:0/6:0:0:0/scsi_disk/6:0:0:0/device   |   1 +
 .../0000:00:1f.2/ata1/ata_port/ata1/device         |   1 +
 .../0000:00:1f.2/ata1/ata_port/ata1/nr_pmp_links   |   1 +
 .../0000:00:1f.2/ata1/ata_port/ata1/port_no        |   1 +
 .../0000:00:1f.2/ata1/host0/scsi_host/host0/device |   1 +
 .../host0/target0:0:0/0:0:0:0/block/sda/device     |   1 +
 .../target0:0:0/0:0:0:0/scsi_device/0:0:0:0/device |   1 +
 .../target0:0:0/0:0:0:0/scsi_disk/0:0:0:0/device   |   1 +
 .../0000:00:1f.2/ata1/link1/ata_link/link1/device  |   1 +
 .../ata1/link1/dev1.0/ata_device/dev1.0/device     |   1 +
 .../0000:00:1f.2/ata2/ata_port/ata2/device         |   1 +
 .../0000:00:1f.2/ata2/ata_port/ata2/nr_pmp_links   |   1 +
 .../0000:00:1f.2/ata2/ata_port/ata2/port_no        |   1 +
 .../0000:00:1f.2/ata2/host1/scsi_host/host1/device |   1 +
 .../host1/target1:0:0/1:0:0:0/block/sdb/device     |   1 +
 .../target1:0:0/1:0:0:0/scsi_device/1:0:0:0/device |   1 +
 .../target1:0:0/1:0:0:0/scsi_disk/1:0:0:0/device   |   1 +
 .../0000:00:1f.2/ata2/link2/ata_link/link2/device  |   1 +
 .../ata2/link2/dev2.0/ata_device/dev2.0/device     |   1 +
 .../0000:00:1f.2/ata3/ata_port/ata3/device         |   1 +
 .../0000:00:1f.2/ata3/ata_port/ata3/nr_pmp_links   |   1 +
 .../0000:00:1f.2/ata3/ata_port/ata3/port_no        |   1 +
 .../0000:00:1f.2/ata3/host2/scsi_host/host2/device |   1 +
 .../host2/target2:0:0/2:0:0:0/block/sdc/device     |   1 +
 .../target2:0:0/2:0:0:0/scsi_device/2:0:0:0/device |   1 +
 .../target2:0:0/2:0:0:0/scsi_disk/2:0:0:0/device   |   1 +
 .../0000:00:1f.2/ata3/link3/ata_link/link3/device  |   1 +
 .../ata3/link3/dev3.0/ata_device/dev3.0/device     |   1 +
 .../0000:00:1f.2/ata4/ata_port/ata4/device         |   1 +
 .../0000:00:1f.2/ata4/ata_port/ata4/nr_pmp_links   |   1 +
 .../0000:00:1f.2/ata4/ata_port/ata4/port_no        |   1 +
 .../0000:00:1f.2/ata4/host3/scsi_host/host3/device |   1 +
 .../host3/target3:0:0/3:0:0:0/block/sr0/device     |   1 +
 .../target3:0:0/3:0:0:0/scsi_device/3:0:0:0/device |   1 +
 .../0000:00:1f.2/ata4/link4/ata_link/link4/device  |   1 +
 .../ata4/link4/dev4.0/ata_device/dev4.0/device     |   1 +
 .../0000:00:1f.2/ata5/ata_port/ata5/device         |   1 +
 .../0000:00:1f.2/ata5/ata_port/ata5/nr_pmp_links   |   1 +
 .../0000:00:1f.2/ata5/ata_port/ata5/port_no        |   1 +
 .../0000:00:1f.2/ata5/link5/ata_link/link5/device  |   1 +
 .../ata5/link5/dev5.0/ata_device/dev5.0/device     |   1 +
 .../0000:00:1f.2/ata6/ata_port/ata6/device         |   1 +
 .../0000:00:1f.2/ata6/ata_port/ata6/nr_pmp_links   |   1 +
 .../0000:00:1f.2/ata6/ata_port/ata6/port_no        |   1 +
 .../0000:00:1f.2/ata6/link6/ata_link/link6/device  |   1 +
 .../ata6/link6/dev6.0/ata_device/dev6.0/device     |   1 +
 .../sys/firmware/edd/int13_dev80/default_cylinders |   1 +
 .../sys/firmware/edd/int13_dev80/default_heads     |   1 +
 .../edd/int13_dev80/default_sectors_per_track      |   1 +
 .../sys/firmware/edd/int13_dev80/extensions        |   2 +
 .../sys/firmware/edd/int13_dev80/host_bus          |   1 +
 .../sys/firmware/edd/int13_dev80/info_flags        |   1 +
 .../sys/firmware/edd/int13_dev80/interface         |   1 +
 .../firmware/edd/int13_dev80/legacy_max_cylinder   |   1 +
 .../sys/firmware/edd/int13_dev80/legacy_max_head   |   1 +
 .../edd/int13_dev80/legacy_sectors_per_track       |   1 +
 .../sys/firmware/edd/int13_dev80/mbr_signature     |   1 +
 .../sys/firmware/edd/int13_dev80/raw_data          | Bin 0 -> 74 bytes
 .../sys/firmware/edd/int13_dev80/sectors           |   1 +
 .../sys/firmware/edd/int13_dev80/version           |   1 +
 .../sys/firmware/edd/int13_dev81/default_cylinders |   1 +
 .../sys/firmware/edd/int13_dev81/default_heads     |   1 +
 .../edd/int13_dev81/default_sectors_per_track      |   1 +
 .../sys/firmware/edd/int13_dev81/extensions        |   2 +
 .../sys/firmware/edd/int13_dev81/host_bus          |   1 +
 .../sys/firmware/edd/int13_dev81/info_flags        |   1 +
 .../sys/firmware/edd/int13_dev81/interface         |   1 +
 .../firmware/edd/int13_dev81/legacy_max_cylinder   |   1 +
 .../sys/firmware/edd/int13_dev81/legacy_max_head   |   1 +
 .../edd/int13_dev81/legacy_sectors_per_track       |   1 +
 .../sys/firmware/edd/int13_dev81/mbr_signature     |   1 +
 .../sys/firmware/edd/int13_dev81/pci_dev           |   1 +
 .../sys/firmware/edd/int13_dev81/raw_data          | Bin 0 -> 74 bytes
 .../sys/firmware/edd/int13_dev81/sectors           |   1 +
 .../sys/firmware/edd/int13_dev81/version           |   1 +
 .../sys/firmware/edd/int13_dev82/default_cylinders |   1 +
 .../sys/firmware/edd/int13_dev82/default_heads     |   1 +
 .../edd/int13_dev82/default_sectors_per_track      |   1 +
 .../sys/firmware/edd/int13_dev82/extensions        |   2 +
 .../sys/firmware/edd/int13_dev82/host_bus          |   1 +
 .../sys/firmware/edd/int13_dev82/info_flags        |   1 +
 .../sys/firmware/edd/int13_dev82/interface         |   1 +
 .../firmware/edd/int13_dev82/legacy_max_cylinder   |   1 +
 .../sys/firmware/edd/int13_dev82/legacy_max_head   |   1 +
 .../edd/int13_dev82/legacy_sectors_per_track       |   1 +
 .../sys/firmware/edd/int13_dev82/mbr_signature     |   1 +
 .../sys/firmware/edd/int13_dev82/pci_dev           |   1 +
 .../sys/firmware/edd/int13_dev82/raw_data          | Bin 0 -> 74 bytes
 .../sys/firmware/edd/int13_dev82/sectors           |   1 +
 .../sys/firmware/edd/int13_dev82/version           |   1 +
 .../sys/firmware/edd/int13_dev83/default_cylinders |   1 +
 .../sys/firmware/edd/int13_dev83/default_heads     |   1 +
 .../edd/int13_dev83/default_sectors_per_track      |   1 +
 .../sys/firmware/edd/int13_dev83/extensions        |   2 +
 .../sys/firmware/edd/int13_dev83/host_bus          |   1 +
 .../sys/firmware/edd/int13_dev83/info_flags        |   1 +
 .../sys/firmware/edd/int13_dev83/interface         |   1 +
 .../firmware/edd/int13_dev83/legacy_max_cylinder   |   1 +
 .../sys/firmware/edd/int13_dev83/legacy_max_head   |   1 +
 .../edd/int13_dev83/legacy_sectors_per_track       |   1 +
 .../sys/firmware/edd/int13_dev83/mbr_signature     |   1 +
 .../sys/firmware/edd/int13_dev83/pci_dev           |   1 +
 .../sys/firmware/edd/int13_dev83/raw_data          | Bin 0 -> 74 bytes
 .../sys/firmware/edd/int13_dev83/sectors           |   1 +
 .../sys/firmware/edd/int13_dev83/version           |   1 +
 tests/devicelibs_test/edd_test.py                  | 167 ++++++++++++++++++++-
 125 files changed, 370 insertions(+), 52 deletions(-)
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/dev/sda
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/dev/sdb
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/dev/sdc
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/dev/sdd
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/dev/sr0
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/dm-0
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/dm-1
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/loop0
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/loop1
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/loop2
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/sda
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/sdb
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/sdc
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/sdd
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/sr0
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2:1.0/host6/scsi_host/host6/device
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2:1.0/host6/target6:0:0/6:0:0:0/block/sdd/device
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2:1.0/host6/target6:0:0/6:0:0:0/scsi_device/6:0:0:0/device
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2:1.0/host6/target6:0:0/6:0:0:0/scsi_disk/6:0:0:0/device
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/ata_port/ata1/device
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/ata_port/ata1/nr_pmp_links
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/ata_port/ata1/port_no
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/scsi_host/host0/device
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/device
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/scsi_device/0:0:0:0/device
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0/device
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/link1/ata_link/link1/device
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/link1/dev1.0/ata_device/dev1.0/device
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/ata_port/ata2/device
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/ata_port/ata2/nr_pmp_links
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/ata_port/ata2/port_no
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/host1/scsi_host/host1/device
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sdb/device
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/scsi_device/1:0:0:0/device
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/scsi_disk/1:0:0:0/device
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/link2/ata_link/link2/device
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/link2/dev2.0/ata_device/dev2.0/device
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/ata_port/ata3/device
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/ata_port/ata3/nr_pmp_links
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/ata_port/ata3/port_no
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/scsi_host/host2/device
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:0/2:0:0:0/block/sdc/device
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:0/2:0:0:0/scsi_device/2:0:0:0/device
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:0/2:0:0:0/scsi_disk/2:0:0:0/device
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/link3/ata_link/link3/device
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/link3/dev3.0/ata_device/dev3.0/device
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/ata_port/ata4/device
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/ata_port/ata4/nr_pmp_links
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/ata_port/ata4/port_no
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/host3/scsi_host/host3/device
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/host3/target3:0:0/3:0:0:0/block/sr0/device
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/host3/target3:0:0/3:0:0:0/scsi_device/3:0:0:0/device
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/link4/ata_link/link4/device
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/link4/dev4.0/ata_device/dev4.0/device
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata5/ata_port/ata5/device
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata5/ata_port/ata5/nr_pmp_links
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata5/ata_port/ata5/port_no
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata5/link5/ata_link/link5/device
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata5/link5/dev5.0/ata_device/dev5.0/device
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata6/ata_port/ata6/device
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata6/ata_port/ata6/nr_pmp_links
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata6/ata_port/ata6/port_no
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata6/link6/ata_link/link6/device
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata6/link6/dev6.0/ata_device/dev6.0/device
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/default_cylinders
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/default_heads
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/default_sectors_per_track
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/extensions
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/host_bus
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/info_flags
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/interface
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/legacy_max_cylinder
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/legacy_max_head
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/legacy_sectors_per_track
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/mbr_signature
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/raw_data
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/sectors
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/version
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/default_cylinders
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/default_heads
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/default_sectors_per_track
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/extensions
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/host_bus
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/info_flags
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/interface
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/legacy_max_cylinder
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/legacy_max_head
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/legacy_sectors_per_track
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/mbr_signature
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/pci_dev
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/raw_data
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/sectors
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/version
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/default_cylinders
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/default_heads
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/default_sectors_per_track
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/extensions
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/host_bus
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/info_flags
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/interface
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/legacy_max_cylinder
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/legacy_max_head
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/legacy_sectors_per_track
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/mbr_signature
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/pci_dev
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/raw_data
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/sectors
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/version
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/default_cylinders
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/default_heads
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/default_sectors_per_track
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/extensions
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/host_bus
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/info_flags
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/interface
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/legacy_max_cylinder
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/legacy_max_head
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/legacy_sectors_per_track
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/mbr_signature
 create mode 120000 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/pci_dev
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/raw_data
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/sectors
 create mode 100644 tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/version

diff --git a/blivet/devicelibs/edd.py b/blivet/devicelibs/edd.py
index e5ac338..44b4be8 100644
--- a/blivet/devicelibs/edd.py
+++ b/blivet/devicelibs/edd.py
@@ -358,47 +358,9 @@ def __init__(self, edd_entry, root=None):
 
     def devname_from_ata_pci_dev(self):
         pattern = util.Path('/sys/block/*', root=self.root)
-        answers = []
-        for path in pattern.glob():
-            emptyslash = util.Path("/", root=self.root)
-            path = util.Path(path, root=self.root)
-            link = util.sysfs_readlink(path=emptyslash, link=path)
-            testdata_log.debug("sysfs link: \"%s\" -> \"%s\"", path, link)
-            # just add /sys/block/ at the beginning so it's always valid
-            # paths in the filesystem...
-            components = ['/sys/block'] + link.split('/')
-            if len(components) != 11:
-                continue
-            # ATA and SATA paths look like:
-            # ../devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda
-            # where literally the only pieces of data here are
-            # "pci0000:00:1f.2", "ata1", and "sda".
-            #
-            # EDD 3's "channel" doesn't really mean anything at all on SATA,
-            # and 255 means "not in use".  Any other value should be an ATA
-            # device (but might be a SATA device in compat mode), and that
-            # matches N in devM.N .  So basically "channel" means master/slave
-            # for ATA (non-SATA) devices.  Also in EDD 3, SATA port multipliers
-            # aren't represented in any way.
-            #
-            # In EDD 4, which unfortunately says to leave 0x30 as the version
-            # number, the port multiplier id is an additional field on the
-            # interface.  So basically we should try to use the value the
-            # kernel gives us*, but we can't trust it.  Thankfully there
-            # won't be a devX.Y.Z (i.e. a port multiplier device) in sysfs
-            # that collides with devX.Z (a non-port-multiplied device),
-            # so if we get a value from the kernel, we can try with and
-            # without it.
-            #
-            # * When the kernel finally learns of these facts...
-            #
-            if components[4] != '0000:%s' % (self.edd.pci_dev,):
-                continue
-            if not components[5].startswith('ata'):
-                continue
-            ata_port = components[5]
-            ata_port_idx = int(components[5][3:])
+        retries = []
 
+        def match_port(components, ata_port, ata_port_idx, path, link):
             fn = util.Path(util.join_paths(components[0:6] \
                                            + ['ata_port', ata_port]), root=self.root)
             port_no = int(util.get_sysfs_attr(fn, 'port_no'))
@@ -407,13 +369,13 @@ def devname_from_ata_pci_dev(self):
                 # On ATA, port_no is kernel's ata_port->local_port_no, which
                 # should be the same as the ata device number.
                 if port_no != self.edd.ata_device:
-                    continue
+                    return
             else:
                 # On SATA, "port_no" is the kernel's ata_port->print_id, which
                 # is awesomely ata_port->id + 1, where ata_port->id is edd's
                 # ata_device
                 if port_no != self.edd.ata_device + 1:
-                    continue
+                    return
 
             fn = components[0:6] + ['link%d' % (ata_port_idx,),]
             exp = [r'.*']+fn+[r'dev%d\.(\d+)(\.(\d+)){0,1}$' % (ata_port_idx,)]
@@ -440,15 +402,92 @@ def devname_from_ata_pci_dev(self):
                         channel = int(match.group(1))
                         if (self.edd.channel == 255 and channel == 0) or \
                                 (self.edd.channel == channel):
-                            answers.append({
-                                'link': util.Path(link, root=self.root),
-                                'path': path.split('/')[-1]})
+                            yield ({'link': util.Path(link, root=self.root),
+                                    'path': path.split('/')[-1]})
                     else:
                         pmp = int(match.group(1))
                         if self.edd.ata_pmp == pmp:
-                            answers.append({
-                                'link': util.Path(link, root=self.root),
-                                'path': path.split('/')[-1]})
+                            yield ({'link': util.Path(link, root=self.root),
+                                    'path': path.split('/')[-1]})
+
+        answers = []
+        for path in pattern.glob():
+            emptyslash = util.Path("/", self.root)
+            path = util.Path(path, self.root)
+            link = util.sysfs_readlink(path=emptyslash, link=path)
+            testdata_log.debug("sysfs link: \"%s\" -> \"%s\"", path, link)
+            # just add /sys/block/ at the beginning so it's always valid
+            # paths in the filesystem...
+            components = ['/sys/block'] + link.split('/')
+            if len(components) != 11:
+                continue
+            # ATA and SATA paths look like:
+            # ../devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda
+            # where literally the only pieces of data here are
+            # "pci0000:00:1f.2", "ata1", and "sda".
+            #
+            # EDD 3's "channel" doesn't really mean anything at all on SATA,
+            # and 255 means "not in use".  Any other value should be an ATA
+            # device (but might be a SATA device in compat mode), and that
+            # matches N in devM.N .  So basically "channel" means master/slave
+            # for ATA (non-SATA) devices.  Also in EDD 3, SATA port multipliers
+            # aren't represented in any way.
+            #
+            # In EDD 4, which unfortunately says to leave 0x30 as the version
+            # number, the port multiplier id is an additional field on the
+            # interface.  So basically we should try to use the value the
+            # kernel gives us*, but we can't trust it.  Thankfully there
+            # won't be a devX.Y.Z (i.e. a port multiplier device) in sysfs
+            # that collides with devX.Z (a non-port-multiplied device),
+            # so if we get a value from the kernel, we can try with and
+            # without it.
+            #
+            # * When the kernel finally learns of these facts...
+            #
+            if components[4] != '0000:%s' % (self.edd.pci_dev,):
+                continue
+            if not components[5].startswith('ata'):
+                continue
+            ata_port = components[5]
+            ata_port_idx = int(components[5][3:])
+
+            # strictly this should always be required, but #!@#!@#!@ seabios
+            # iterates the sata device number /independently/ of the host
+            # bridge it claims things are attached to.  In that case this
+            # the scsi target will always have "0" as the ID component.
+            args = { 'device': self.edd.ata_device }
+            exp = r"target\d+:0:%(device)s/\d+:0:%(device)s:0/block/.*" % args
+            matcher = re.compile(exp)
+            match = matcher.match("/".join(components[7:]))
+            if not match:
+                retries.append({
+                    'components': components,
+                    'ata_port': ata_port,
+                    'ata_port_idx': ata_port_idx,
+                    'path': path,
+                    'link': link,
+                })
+                continue
+
+            for port in match_port(components, ata_port, ata_port_idx, path,
+                                   link):
+                answers.append(port)
+
+        # now handle the ones we discarded because libata's scsi id doesn't
+        # match the ata_device.
+        for retry in retries:
+            for port in match_port(**retry):
+                if answers:
+                    log.warning("edd: ignoring possible extra match for ATA device %s channel %s ata %d pmp %s: %s",
+                                self.edd.pci_dev, self.edd.channel,
+                                self.edd.ata_device, self.edd.ata_pmp,
+                                retry['path'])
+                else:
+                    log.warning("edd: using possible extra match for ATA device %s channel %s ata %d pmp %s: %s",
+                                self.edd.pci_dev, self.edd.channel,
+                                self.edd.ata_device, self.edd.ata_pmp,
+                                retry['path'])
+                    answers.append(port)
 
         if len(answers) > 1:
             log.error("edd: Found too many ATA devices for EDD device 0x%x: %s",
@@ -459,7 +498,7 @@ def devname_from_ata_pci_dev(self):
             return answers[0]['path']
         else:
             log.warning(
-                "edd: Could not find ATA device for pci dev %s channel %s ata %d pmp %d",
+                "edd: Could not find ATA device for pci dev %s channel %s ata %d pmp %s",
                 self.edd.pci_dev, self.edd.channel,
                 self.edd.ata_device, self.edd.ata_pmp)
 
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/dev/sda b/tests/devicelibs_test/edd_data/strawberry_mountain/dev/sda
new file mode 100644
index 0000000000000000000000000000000000000000..b68839a88dc2f8b6eff6f359ea64595e1b04bde7
GIT binary patch
literal 512
gcmZQz7zIN)1Q;3K{rmr)5$J{W^A-w`>XXn_09twm>;M1&

literal 0
HcmV?d00001

diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/dev/sdb b/tests/devicelibs_test/edd_data/strawberry_mountain/dev/sdb
new file mode 100644
index 0000000000000000000000000000000000000000..8911f64010a5299a3d0582824940e59da2758f67
GIT binary patch
literal 512
gcmZQz7zIN)1Q;3K{rmr)5$J{WKLR*O^-1U|09xG!>;M1&

literal 0
HcmV?d00001

diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/dev/sdc b/tests/devicelibs_test/edd_data/strawberry_mountain/dev/sdc
new file mode 100644
index 0000000000000000000000000000000000000000..2e91fba1c599fb2ef6e69e125eaa49bfd2bc8b6c
GIT binary patch
literal 512
zcmaEzJVBuE!XAbVI~W-HZuA}ay^o=0KLguN2ByzTUMaFMFznmMZoyK at -F!@-@!vo8
z($BBOwlHmA+|5w4siCWcvD=5~tne#_8U}{f{}|9f10z)6|E~!Xz8z{PVf}WfpoD2t
z!>dZ5dcy-i>wp$3{9ce!WAnd+spC-4KGvEoj=NWdo)wM?Dza_-9lEO2y!jzxiIL%f
zP8Sx34wwI(E=<Q+1Q^n~<zi~mI%7D1j06ya=eP?SL%|lOv%*EJyBP{zmu=xVD_qPQ
z)pCiy`5wc**4md%3~Bt^j&-E`cSr-8#lP+1!ADFTFFL+Bbh>cxZ##701yfolOWH!9
zX`Ba2{n8c!%{RQ1_T8l8B8Vzsv3B98HUD?8<EX)bgD;pk4t89K>Np0ps_(Gj?H!E3
zP$-h?Ih-K3lYz1Cw&Az^3=Mt9{(N34pZH%bs%Bq9?Q7<J{k1Pl81_x6eWAy2R^s(P
z_n=TG1qS!j{9Fc)#G(`hm(1d9hM?5M6b1#?qN4mFUM_~+j0{`&&I+utVJQ7_7&UY!
t8ZZL|8Wa>6n(xZlGjISo3-}or?#kQu{rmr)VFi%=VWJSK9!y^7Dga2EzF+_V

literal 0
HcmV?d00001

diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/dev/sdd b/tests/devicelibs_test/edd_data/strawberry_mountain/dev/sdd
new file mode 100644
index 0000000000000000000000000000000000000000..942fac73668ee9feb6d19ad345a4b5abb577c852
GIT binary patch
literal 512
zcmaEzJfZJK--SI4HJ#7c!ut;V{<EKfZ6^cc=cTXY*%%mtg0?vBUKMJ1(%{?Av%*Ef
zjlV-zmGWMES<IPsoUNB_i_>e-s4X04g_|GR2l8(_=J5StP(YgDfwY+~(ij>T86e>Q
zuL%>r9cn0H{dTCJglSX5tI8S%2Ezjodlh~!NU5>;U&7RJC}<yR4cNM~!cjp*wqU!=
zn;$Zk7#SYubYXGmaQWZq!gQQPfFZ40E~X}}Glm1mNB}W-j=Qii6l`$<x{-A^L&57Z
zkfVxuqgpQUH{WB}*IN6si6IT>z>bvv4rxHM__tj=_=u_FMaLJ1P8SaTZHErLU`p#`
zNm~dsjq^aMU)n;T`G%L$zMFJh1W_d{)-D{i=Kl_M95py_ at C6gc!Hx at 29mjxH^&K|6
zy at QbnXt7++;RHEg(DmIm{I;K=q3_tA&r9VK|EopS>}#lf&AhL__Js+<zA3dY^cc=c
zy#D7N6zZhF;GUYF%ixh%l%n90S)9!fl$w~rpx|0mlwZWl#ju-^VGG|`fi*S^rC$z1
l0~1QQim6XzU}#WKWN7~P|33o<P&nf*EWlBf;^Bp^0sw9a#J~Um

literal 0
HcmV?d00001

diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/dev/sr0 b/tests/devicelibs_test/edd_data/strawberry_mountain/dev/sr0
new file mode 100644
index 0000000..e69de29
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/dm-0 b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/dm-0
new file mode 120000
index 0000000..0212333
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/dm-0
@@ -0,0 +1 @@
+../devices/virtual/block/dm-0
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/dm-1 b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/dm-1
new file mode 120000
index 0000000..738b868
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/dm-1
@@ -0,0 +1 @@
+../devices/virtual/block/dm-1
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/loop0 b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/loop0
new file mode 120000
index 0000000..caf270b
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/loop0
@@ -0,0 +1 @@
+../devices/virtual/block/loop0
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/loop1 b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/loop1
new file mode 120000
index 0000000..ad28556
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/loop1
@@ -0,0 +1 @@
+../devices/virtual/block/loop1
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/loop2 b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/loop2
new file mode 120000
index 0000000..cd6da29
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/loop2
@@ -0,0 +1 @@
+../devices/virtual/block/loop2
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/sda b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/sda
new file mode 120000
index 0000000..45845a0
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/sda
@@ -0,0 +1 @@
+../devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/sdb b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/sdb
new file mode 120000
index 0000000..5794fad
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/sdb
@@ -0,0 +1 @@
+../devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sdb
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/sdc b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/sdc
new file mode 120000
index 0000000..b40e3b4
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/sdc
@@ -0,0 +1 @@
+../devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:0/2:0:0:0/block/sdc
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/sdd b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/sdd
new file mode 120000
index 0000000..9b1f945
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/sdd
@@ -0,0 +1 @@
+../devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2:1.0/host6/target6:0:0/6:0:0:0/block/sdd
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/sr0 b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/sr0
new file mode 120000
index 0000000..f659c8c
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/block/sr0
@@ -0,0 +1 @@
+../devices/pci0000:00/0000:00:1f.2/ata4/host3/target3:0:0/3:0:0:0/block/sr0
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2:1.0/host6/scsi_host/host6/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2:1.0/host6/scsi_host/host6/device
new file mode 120000
index 0000000..b8abc28
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2:1.0/host6/scsi_host/host6/device
@@ -0,0 +1 @@
+../../../host6
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2:1.0/host6/target6:0:0/6:0:0:0/block/sdd/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2:1.0/host6/target6:0:0/6:0:0:0/block/sdd/device
new file mode 120000
index 0000000..5be613c
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2:1.0/host6/target6:0:0/6:0:0:0/block/sdd/device
@@ -0,0 +1 @@
+../../../6:0:0:0
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2:1.0/host6/target6:0:0/6:0:0:0/scsi_device/6:0:0:0/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2:1.0/host6/target6:0:0/6:0:0:0/scsi_device/6:0:0:0/device
new file mode 120000
index 0000000..5be613c
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2:1.0/host6/target6:0:0/6:0:0:0/scsi_device/6:0:0:0/device
@@ -0,0 +1 @@
+../../../6:0:0:0
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2:1.0/host6/target6:0:0/6:0:0:0/scsi_disk/6:0:0:0/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2:1.0/host6/target6:0:0/6:0:0:0/scsi_disk/6:0:0:0/device
new file mode 120000
index 0000000..5be613c
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2:1.0/host6/target6:0:0/6:0:0:0/scsi_disk/6:0:0:0/device
@@ -0,0 +1 @@
+../../../6:0:0:0
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/ata_port/ata1/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/ata_port/ata1/device
new file mode 120000
index 0000000..28280b6
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/ata_port/ata1/device
@@ -0,0 +1 @@
+../../../ata1
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/ata_port/ata1/nr_pmp_links b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/ata_port/ata1/nr_pmp_links
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/ata_port/ata1/nr_pmp_links
@@ -0,0 +1 @@
+0
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/ata_port/ata1/port_no b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/ata_port/ata1/port_no
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/ata_port/ata1/port_no
@@ -0,0 +1 @@
+1
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/scsi_host/host0/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/scsi_host/host0/device
new file mode 120000
index 0000000..50ea9d7
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/scsi_host/host0/device
@@ -0,0 +1 @@
+../../../host0
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/device
new file mode 120000
index 0000000..79ba802
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda/device
@@ -0,0 +1 @@
+../../../0:0:0:0
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/scsi_device/0:0:0:0/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/scsi_device/0:0:0:0/device
new file mode 120000
index 0000000..79ba802
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/scsi_device/0:0:0:0/device
@@ -0,0 +1 @@
+../../../0:0:0:0
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0/device
new file mode 120000
index 0000000..79ba802
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0/device
@@ -0,0 +1 @@
+../../../0:0:0:0
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/link1/ata_link/link1/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/link1/ata_link/link1/device
new file mode 120000
index 0000000..119b98a
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/link1/ata_link/link1/device
@@ -0,0 +1 @@
+../../../link1
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/link1/dev1.0/ata_device/dev1.0/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/link1/dev1.0/ata_device/dev1.0/device
new file mode 120000
index 0000000..f7359b6
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata1/link1/dev1.0/ata_device/dev1.0/device
@@ -0,0 +1 @@
+../../../dev1.0
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/ata_port/ata2/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/ata_port/ata2/device
new file mode 120000
index 0000000..b80fb52
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/ata_port/ata2/device
@@ -0,0 +1 @@
+../../../ata2
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/ata_port/ata2/nr_pmp_links b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/ata_port/ata2/nr_pmp_links
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/ata_port/ata2/nr_pmp_links
@@ -0,0 +1 @@
+0
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/ata_port/ata2/port_no b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/ata_port/ata2/port_no
new file mode 100644
index 0000000..0cfbf08
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/ata_port/ata2/port_no
@@ -0,0 +1 @@
+2
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/host1/scsi_host/host1/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/host1/scsi_host/host1/device
new file mode 120000
index 0000000..20f114d
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/host1/scsi_host/host1/device
@@ -0,0 +1 @@
+../../../host1
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sdb/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sdb/device
new file mode 120000
index 0000000..b48368a
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sdb/device
@@ -0,0 +1 @@
+../../../1:0:0:0
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/scsi_device/1:0:0:0/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/scsi_device/1:0:0:0/device
new file mode 120000
index 0000000..b48368a
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/scsi_device/1:0:0:0/device
@@ -0,0 +1 @@
+../../../1:0:0:0
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/scsi_disk/1:0:0:0/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/scsi_disk/1:0:0:0/device
new file mode 120000
index 0000000..b48368a
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/scsi_disk/1:0:0:0/device
@@ -0,0 +1 @@
+../../../1:0:0:0
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/link2/ata_link/link2/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/link2/ata_link/link2/device
new file mode 120000
index 0000000..2b104a0
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/link2/ata_link/link2/device
@@ -0,0 +1 @@
+../../../link2
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/link2/dev2.0/ata_device/dev2.0/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/link2/dev2.0/ata_device/dev2.0/device
new file mode 120000
index 0000000..5648cdf
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata2/link2/dev2.0/ata_device/dev2.0/device
@@ -0,0 +1 @@
+../../../dev2.0
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/ata_port/ata3/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/ata_port/ata3/device
new file mode 120000
index 0000000..15cd03b
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/ata_port/ata3/device
@@ -0,0 +1 @@
+../../../ata3
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/ata_port/ata3/nr_pmp_links b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/ata_port/ata3/nr_pmp_links
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/ata_port/ata3/nr_pmp_links
@@ -0,0 +1 @@
+0
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/ata_port/ata3/port_no b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/ata_port/ata3/port_no
new file mode 100644
index 0000000..00750ed
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/ata_port/ata3/port_no
@@ -0,0 +1 @@
+3
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/scsi_host/host2/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/scsi_host/host2/device
new file mode 120000
index 0000000..c616df1
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/scsi_host/host2/device
@@ -0,0 +1 @@
+../../../host2
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:0/2:0:0:0/block/sdc/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:0/2:0:0:0/block/sdc/device
new file mode 120000
index 0000000..c29c71c
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:0/2:0:0:0/block/sdc/device
@@ -0,0 +1 @@
+../../../2:0:0:0
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:0/2:0:0:0/scsi_device/2:0:0:0/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:0/2:0:0:0/scsi_device/2:0:0:0/device
new file mode 120000
index 0000000..c29c71c
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:0/2:0:0:0/scsi_device/2:0:0:0/device
@@ -0,0 +1 @@
+../../../2:0:0:0
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:0/2:0:0:0/scsi_disk/2:0:0:0/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:0/2:0:0:0/scsi_disk/2:0:0:0/device
new file mode 120000
index 0000000..c29c71c
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:0/2:0:0:0/scsi_disk/2:0:0:0/device
@@ -0,0 +1 @@
+../../../2:0:0:0
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/link3/ata_link/link3/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/link3/ata_link/link3/device
new file mode 120000
index 0000000..384d97e
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/link3/ata_link/link3/device
@@ -0,0 +1 @@
+../../../link3
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/link3/dev3.0/ata_device/dev3.0/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/link3/dev3.0/ata_device/dev3.0/device
new file mode 120000
index 0000000..e62e1d6
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata3/link3/dev3.0/ata_device/dev3.0/device
@@ -0,0 +1 @@
+../../../dev3.0
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/ata_port/ata4/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/ata_port/ata4/device
new file mode 120000
index 0000000..0a2610d
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/ata_port/ata4/device
@@ -0,0 +1 @@
+../../../ata4
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/ata_port/ata4/nr_pmp_links b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/ata_port/ata4/nr_pmp_links
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/ata_port/ata4/nr_pmp_links
@@ -0,0 +1 @@
+0
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/ata_port/ata4/port_no b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/ata_port/ata4/port_no
new file mode 100644
index 0000000..b8626c4
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/ata_port/ata4/port_no
@@ -0,0 +1 @@
+4
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/host3/scsi_host/host3/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/host3/scsi_host/host3/device
new file mode 120000
index 0000000..027c07f
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/host3/scsi_host/host3/device
@@ -0,0 +1 @@
+../../../host3
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/host3/target3:0:0/3:0:0:0/block/sr0/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/host3/target3:0:0/3:0:0:0/block/sr0/device
new file mode 120000
index 0000000..79a41d8
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/host3/target3:0:0/3:0:0:0/block/sr0/device
@@ -0,0 +1 @@
+../../../3:0:0:0
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/host3/target3:0:0/3:0:0:0/scsi_device/3:0:0:0/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/host3/target3:0:0/3:0:0:0/scsi_device/3:0:0:0/device
new file mode 120000
index 0000000..79a41d8
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/host3/target3:0:0/3:0:0:0/scsi_device/3:0:0:0/device
@@ -0,0 +1 @@
+../../../3:0:0:0
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/link4/ata_link/link4/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/link4/ata_link/link4/device
new file mode 120000
index 0000000..44d0aa9
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/link4/ata_link/link4/device
@@ -0,0 +1 @@
+../../../link4
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/link4/dev4.0/ata_device/dev4.0/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/link4/dev4.0/ata_device/dev4.0/device
new file mode 120000
index 0000000..7a8422b
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata4/link4/dev4.0/ata_device/dev4.0/device
@@ -0,0 +1 @@
+../../../dev4.0
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata5/ata_port/ata5/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata5/ata_port/ata5/device
new file mode 120000
index 0000000..e4b07d8
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata5/ata_port/ata5/device
@@ -0,0 +1 @@
+../../../ata5
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata5/ata_port/ata5/nr_pmp_links b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata5/ata_port/ata5/nr_pmp_links
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata5/ata_port/ata5/nr_pmp_links
@@ -0,0 +1 @@
+0
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata5/ata_port/ata5/port_no b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata5/ata_port/ata5/port_no
new file mode 100644
index 0000000..7ed6ff8
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata5/ata_port/ata5/port_no
@@ -0,0 +1 @@
+5
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata5/link5/ata_link/link5/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata5/link5/ata_link/link5/device
new file mode 120000
index 0000000..6951f69
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata5/link5/ata_link/link5/device
@@ -0,0 +1 @@
+../../../link5
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata5/link5/dev5.0/ata_device/dev5.0/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata5/link5/dev5.0/ata_device/dev5.0/device
new file mode 120000
index 0000000..ea1d13b
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata5/link5/dev5.0/ata_device/dev5.0/device
@@ -0,0 +1 @@
+../../../dev5.0
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata6/ata_port/ata6/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata6/ata_port/ata6/device
new file mode 120000
index 0000000..7683f59
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata6/ata_port/ata6/device
@@ -0,0 +1 @@
+../../../ata6
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata6/ata_port/ata6/nr_pmp_links b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata6/ata_port/ata6/nr_pmp_links
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata6/ata_port/ata6/nr_pmp_links
@@ -0,0 +1 @@
+0
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata6/ata_port/ata6/port_no b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata6/ata_port/ata6/port_no
new file mode 100644
index 0000000..1e8b314
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata6/ata_port/ata6/port_no
@@ -0,0 +1 @@
+6
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata6/link6/ata_link/link6/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata6/link6/ata_link/link6/device
new file mode 120000
index 0000000..421edb9
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata6/link6/ata_link/link6/device
@@ -0,0 +1 @@
+../../../link6
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata6/link6/dev6.0/ata_device/dev6.0/device b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata6/link6/dev6.0/ata_device/dev6.0/device
new file mode 120000
index 0000000..c7d7e1d
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/devices/pci0000:00/0000:00:1f.2/ata6/link6/dev6.0/ata_device/dev6.0/device
@@ -0,0 +1 @@
+../../../dev6.0
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/default_cylinders b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/default_cylinders
new file mode 100644
index 0000000..d7b1c44
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/default_cylinders
@@ -0,0 +1 @@
+1024
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/default_heads b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/default_heads
new file mode 100644
index 0000000..900731f
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/default_heads
@@ -0,0 +1 @@
+64
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/default_sectors_per_track b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/default_sectors_per_track
new file mode 100644
index 0000000..f5c8955
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/default_sectors_per_track
@@ -0,0 +1 @@
+32
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/extensions b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/extensions
new file mode 100644
index 0000000..3229770
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/extensions
@@ -0,0 +1,2 @@
+Fixed disk access
+Enhanced Disk Drive support
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/host_bus b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/host_bus
new file mode 100644
index 0000000..9135939
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/host_bus
@@ -0,0 +1 @@
+PCI 	ff:ff.255  channel: 255
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/info_flags b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/info_flags
new file mode 100644
index 0000000..7b65cd3
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/info_flags
@@ -0,0 +1 @@
+geometry valid
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/interface b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/interface
new file mode 100644
index 0000000..310ca05
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/interface
@@ -0,0 +1 @@
+USB     	serial_number: 30302e31
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/legacy_max_cylinder b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/legacy_max_cylinder
new file mode 100644
index 0000000..c778141
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/legacy_max_cylinder
@@ -0,0 +1 @@
+1022
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/legacy_max_head b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/legacy_max_head
new file mode 100644
index 0000000..4b9026d
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/legacy_max_head
@@ -0,0 +1 @@
+63
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/legacy_sectors_per_track b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/legacy_sectors_per_track
new file mode 100644
index 0000000..f5c8955
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/legacy_sectors_per_track
@@ -0,0 +1 @@
+32
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/mbr_signature b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/mbr_signature
new file mode 100644
index 0000000..5b01e3f
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/mbr_signature
@@ -0,0 +1 @@
+0x91271645
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/raw_data b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/raw_data
new file mode 100644
index 0000000000000000000000000000000000000000..5b1e524ab524cf4dd90ad12578671dff4cd3817d
GIT binary patch
literal 74
zcmeZbU}9ikVPJ4zU|>)HVupshj3A1E=|2$M-KPU&1~_{vga$h)fB;AoByFf?U;v`w
G;0FLk`w$HP

literal 0
HcmV?d00001

diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/sectors b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/sectors
new file mode 100644
index 0000000..9126884
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/sectors
@@ -0,0 +1 @@
+31293440
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/version b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/version
new file mode 100644
index 0000000..b7845cb
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev80/version
@@ -0,0 +1 @@
+0x21
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/default_cylinders b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/default_cylinders
new file mode 100644
index 0000000..cb521a2
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/default_cylinders
@@ -0,0 +1 @@
+16383
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/default_heads b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/default_heads
new file mode 100644
index 0000000..b6a7d89
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/default_heads
@@ -0,0 +1 @@
+16
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/default_sectors_per_track b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/default_sectors_per_track
new file mode 100644
index 0000000..4b9026d
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/default_sectors_per_track
@@ -0,0 +1 @@
+63
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/extensions b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/extensions
new file mode 100644
index 0000000..3229770
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/extensions
@@ -0,0 +1,2 @@
+Fixed disk access
+Enhanced Disk Drive support
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/host_bus b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/host_bus
new file mode 100644
index 0000000..11f75a6
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/host_bus
@@ -0,0 +1 @@
+PCI 	00:1f.2  channel: 255
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/info_flags b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/info_flags
new file mode 100644
index 0000000..7b65cd3
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/info_flags
@@ -0,0 +1 @@
+geometry valid
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/interface b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/interface
new file mode 100644
index 0000000..4cece42
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/interface
@@ -0,0 +1 @@
+SATA    	device: 2
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/legacy_max_cylinder b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/legacy_max_cylinder
new file mode 100644
index 0000000..c778141
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/legacy_max_cylinder
@@ -0,0 +1 @@
+1022
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/legacy_max_head b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/legacy_max_head
new file mode 100644
index 0000000..f1aaa90
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/legacy_max_head
@@ -0,0 +1 @@
+254
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/legacy_sectors_per_track b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/legacy_sectors_per_track
new file mode 100644
index 0000000..4b9026d
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/legacy_sectors_per_track
@@ -0,0 +1 @@
+63
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/mbr_signature b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/mbr_signature
new file mode 100644
index 0000000..2759fae
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/mbr_signature
@@ -0,0 +1 @@
+0x00033091
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/pci_dev b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/pci_dev
new file mode 120000
index 0000000..cb9f3ca
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/pci_dev
@@ -0,0 +1 @@
+../../../devices/pci0000:00/0000:00:1f.2
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/raw_data b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/raw_data
new file mode 100644
index 0000000000000000000000000000000000000000..a86f6477778d6e5df57637b079ef4f74e949ca08
GIT binary patch
literal 74
zcmeZbU}E at h&%hwSz`y{c7&gpXC<LS!7?}P8!QFj2KxTlmr$Vq}h@%1!Fvv6g2TOwp
HWKaYEY)lQ=

literal 0
HcmV?d00001

diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/sectors b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/sectors
new file mode 100644
index 0000000..98eca40
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/sectors
@@ -0,0 +1 @@
+312581808
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/version b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/version
new file mode 100644
index 0000000..5a0dc65
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev81/version
@@ -0,0 +1 @@
+0x30
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/default_cylinders b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/default_cylinders
new file mode 100644
index 0000000..cb521a2
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/default_cylinders
@@ -0,0 +1 @@
+16383
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/default_heads b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/default_heads
new file mode 100644
index 0000000..b6a7d89
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/default_heads
@@ -0,0 +1 @@
+16
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/default_sectors_per_track b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/default_sectors_per_track
new file mode 100644
index 0000000..4b9026d
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/default_sectors_per_track
@@ -0,0 +1 @@
+63
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/extensions b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/extensions
new file mode 100644
index 0000000..3229770
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/extensions
@@ -0,0 +1,2 @@
+Fixed disk access
+Enhanced Disk Drive support
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/host_bus b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/host_bus
new file mode 100644
index 0000000..11f75a6
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/host_bus
@@ -0,0 +1 @@
+PCI 	00:1f.2  channel: 255
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/info_flags b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/info_flags
new file mode 100644
index 0000000..7b65cd3
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/info_flags
@@ -0,0 +1 @@
+geometry valid
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/interface b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/interface
new file mode 100644
index 0000000..8d728dc
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/interface
@@ -0,0 +1 @@
+SATA    	device: 1
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/legacy_max_cylinder b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/legacy_max_cylinder
new file mode 100644
index 0000000..c778141
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/legacy_max_cylinder
@@ -0,0 +1 @@
+1022
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/legacy_max_head b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/legacy_max_head
new file mode 100644
index 0000000..f1aaa90
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/legacy_max_head
@@ -0,0 +1 @@
+254
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/legacy_sectors_per_track b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/legacy_sectors_per_track
new file mode 100644
index 0000000..4b9026d
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/legacy_sectors_per_track
@@ -0,0 +1 @@
+63
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/mbr_signature b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/mbr_signature
new file mode 100644
index 0000000..e79e876
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/mbr_signature
@@ -0,0 +1 @@
+0x00000000
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/pci_dev b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/pci_dev
new file mode 120000
index 0000000..cb9f3ca
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/pci_dev
@@ -0,0 +1 @@
+../../../devices/pci0000:00/0000:00:1f.2
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/raw_data b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/raw_data
new file mode 100644
index 0000000000000000000000000000000000000000..2a44b90b053c711e25c226ab29d3a4f426348f5e
GIT binary patch
literal 74
zcmeZbU}E at h&%hwSz`y{c7&iO}-~>_(3{3xl;O;&hATz+(Qz6(f#8CkV804A$gQOWj
I1TrWF0BoKO*#H0l

literal 0
HcmV?d00001

diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/sectors b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/sectors
new file mode 100644
index 0000000..217114e
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/sectors
@@ -0,0 +1 @@
+156301488
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/version b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/version
new file mode 100644
index 0000000..5a0dc65
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev82/version
@@ -0,0 +1 @@
+0x30
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/default_cylinders b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/default_cylinders
new file mode 100644
index 0000000..cb521a2
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/default_cylinders
@@ -0,0 +1 @@
+16383
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/default_heads b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/default_heads
new file mode 100644
index 0000000..b6a7d89
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/default_heads
@@ -0,0 +1 @@
+16
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/default_sectors_per_track b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/default_sectors_per_track
new file mode 100644
index 0000000..4b9026d
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/default_sectors_per_track
@@ -0,0 +1 @@
+63
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/extensions b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/extensions
new file mode 100644
index 0000000..3229770
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/extensions
@@ -0,0 +1,2 @@
+Fixed disk access
+Enhanced Disk Drive support
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/host_bus b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/host_bus
new file mode 100644
index 0000000..11f75a6
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/host_bus
@@ -0,0 +1 @@
+PCI 	00:1f.2  channel: 255
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/info_flags b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/info_flags
new file mode 100644
index 0000000..7b65cd3
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/info_flags
@@ -0,0 +1 @@
+geometry valid
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/interface b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/interface
new file mode 100644
index 0000000..07dae03
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/interface
@@ -0,0 +1 @@
+SATA    	device: 0
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/legacy_max_cylinder b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/legacy_max_cylinder
new file mode 100644
index 0000000..c778141
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/legacy_max_cylinder
@@ -0,0 +1 @@
+1022
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/legacy_max_head b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/legacy_max_head
new file mode 100644
index 0000000..f1aaa90
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/legacy_max_head
@@ -0,0 +1 @@
+254
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/legacy_sectors_per_track b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/legacy_sectors_per_track
new file mode 100644
index 0000000..4b9026d
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/legacy_sectors_per_track
@@ -0,0 +1 @@
+63
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/mbr_signature b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/mbr_signature
new file mode 100644
index 0000000..e79e876
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/mbr_signature
@@ -0,0 +1 @@
+0x00000000
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/pci_dev b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/pci_dev
new file mode 120000
index 0000000..cb9f3ca
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/pci_dev
@@ -0,0 +1 @@
+../../../devices/pci0000:00/0000:00:1f.2
\ No newline at end of file
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/raw_data b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/raw_data
new file mode 100644
index 0000000000000000000000000000000000000000..6fe63f811f5d1e09937cfcd97ec61d1f359db7a1
GIT binary patch
literal 74
zcmeZbU}E at h&%hwSz`y{c7&gpXC<LS!7?}P8!QFj2KxTlmr$Vq}h@%1!Fvv6g2g{=q
FB>-$H4cPzy

literal 0
HcmV?d00001

diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/sectors b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/sectors
new file mode 100644
index 0000000..98eca40
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/sectors
@@ -0,0 +1 @@
+312581808
diff --git a/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/version b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/version
new file mode 100644
index 0000000..5a0dc65
--- /dev/null
+++ b/tests/devicelibs_test/edd_data/strawberry_mountain/sys/firmware/edd/int13_dev83/version
@@ -0,0 +1 @@
+0x30
diff --git a/tests/devicelibs_test/edd_test.py b/tests/devicelibs_test/edd_test.py
index 713e1ba..56ce5f2 100644
--- a/tests/devicelibs_test/edd_test.py
+++ b/tests/devicelibs_test/edd_test.py
@@ -197,6 +197,7 @@ def test_get_edd_dict_sata_usb(self):
             ("edd: interface type %s is not implemented (%s)", "USB",
                 "/sys/firmware/edd/int13_dev81/"),
             ("edd: interface details: %s", "USB     \tserial_number: 30302e31"),
+            ('edd: using possible extra match for ATA device %s channel %s ata %d pmp %s: %s', '00:1f.2', 255, 1, None, '/sys/block/sda')
         ]
         self.check_logs(debugs=debugs, infos=infos, warnings=warnings)
 
@@ -358,7 +359,167 @@ def test_get_edd_dict_absurd_virt(self):
             ('edd: Could not find Virtio device for pci dev %s channel %s', '00:01.1', 0),
             ('edd: Could not find Virtio device for pci dev %s channel %s', '00:0b.0', 0),
         ]
-        errors = [
-            ('edd: Found too many ATA devices for EDD device 0x%x: %s', 129, ['../devices/pci0000:00/0000:00:01.1/ata7/host6/target6:0:1/6:0:1:0/block/sdb', '../devices/pci0000:00/0000:00:01.1/ata7/host6/target6:0:0/6:0:0:0/block/sr0']),
+        warnings = [
+            ('edd: ignoring possible extra match for ATA device %s channel %s ata %d pmp %s: %s', '00:01.1', 0, 1, None, '/sys/block/sr0'),
+        ]
+        self.check_logs(debugs=debugs, infos=infos, warnings=warnings)
+
+    def test_collect_mbrs_strawberry_mountain(self):
+        self._edd_logger.debug("starting test %s", self._testMethodName)
+        edd.testdata_log.debug("starting test %s", self._testMethodName)
+        devices=(FakeDevice("sda"),
+                 FakeDevice("sdb"),
+                 FakeDevice("sdc"),
+                 FakeDevice("sdd"),
+                 )
+        fake_mbr_dict = { 'sdc': '0x00033091',
+                          'sdd': '0x91271645',
+                          }
+        mbr_dict = edd.collect_mbrs(devices,
+                                    root=self.root('strawberry_mountain'))
+        infos = [
+            ("edd: MBR signature on %s is zero. new disk image?", "sda"),
+            ("edd: MBR signature on %s is zero. new disk image?", "sdb"),
+            ("edd: collected mbr signatures: %s", { 'sdc': '0x00033091',
+                                                    'sdd': '0x91271645',
+                                                    }),
+        ]
+        warnings = [
+        ]
+        self.check_logs(infos=infos, warnings=warnings)
+        lib.assertVerboseEqual(fake_mbr_dict, mbr_dict)
+
+    def test_collect_edd_data_strawberry_mountain(self):
+        # test with sata sda, usb sdb
+        self._edd_logger.debug("starting test %s", self._testMethodName)
+        edd.testdata_log.debug("starting test %s", self._testMethodName)
+        fakeedd = {
+            0x80: FakeEddEntry(version="0x21", mbr_sig="0x91271645",
+                               sectors=31293440, host_bus="PCI", type="USB",
+                               pci_dev="ff:ff.255", channel=255,
+                               interface="USB     \tserial_number: 30302e31",
+                               usb_serial=0x30302e31,
+                               sysfspath="/sys/firmware/edd/int13_dev80/"),
+            0x81: FakeEddEntry(version="0x30", mbr_sig="0x00033091",
+                               sectors=312581808, host_bus="PCI", type="SATA",
+                               pci_dev="00:1f.2", channel=255, ata_device=2,
+                               interface="SATA    \tdevice: 2",
+                               sysfspath="/sys/firmware/edd/int13_dev81/"),
+            0x82: FakeEddEntry(version="0x30", mbr_sig="0x00000000",
+                               sectors=156301488, host_bus="PCI", type="SATA",
+                               pci_dev="00:1f.2", channel=255, ata_device=1,
+                               interface="SATA    \tdevice: 1",
+                               sysfspath="/sys/firmware/edd/int13_dev82/"),
+            0x83: FakeEddEntry(version="0x30", mbr_sig="0x00000000",
+                               sectors=312581808, host_bus="PCI", type="SATA",
+                               pci_dev="00:1f.2", channel=255, ata_device=0,
+                               interface="SATA    \tdevice: 0",
+                               sysfspath="/sys/firmware/edd/int13_dev83/"),
+        }
+
+        edd_dict = edd.collect_edd_data(root=self.root('strawberry_mountain'))
+        self.debug('edd_dict: %s', edd_dict)
+        debugs = [
+            ("edd: found device 0x%x at %s", 0x80,
+             '/sys/firmware/edd/int13_dev80/'),
+            ("edd: found device 0x%x at %s", 0x81,
+             '/sys/firmware/edd/int13_dev81/'),
+            ("edd: found device 0x%x at %s", 0x82,
+             '/sys/firmware/edd/int13_dev82/'),
+            ("edd: found device 0x%x at %s", 0x83,
+             '/sys/firmware/edd/int13_dev83/'),
         ]
-        self.check_logs(debugs=debugs, infos=infos, errors=errors)
+        self.check_logs(debugs=debugs)
+        lib.assertVerboseEqual(fakeedd[0x80], edd_dict[0x80])
+        lib.assertVerboseEqual(fakeedd[0x81], edd_dict[0x81])
+        lib.assertVerboseEqual(fakeedd[0x82], edd_dict[0x82])
+        lib.assertVerboseEqual(fakeedd[0x83], edd_dict[0x83])
+        lib.assertVerboseEqual(len(edd_dict), 4)
+
+    def test_get_edd_dict_strawberry_mountain(self):
+        # test with sata sda, usb sdb
+        self._edd_logger.debug("starting test %s", self._testMethodName)
+        edd.testdata_log.debug("starting test %s", self._testMethodName)
+        devices=(FakeDevice("sda"),
+                 FakeDevice("sdb"),
+                 FakeDevice("sdc"),
+                 FakeDevice("sdd"),
+                 )
+        fakeedd = {
+            0x80: FakeEddEntry(version="0x21", mbr_sig="0x91271645",
+                               sectors=31293440, host_bus="PCI", type="USB",
+                               pci_dev="ff:ff.255", channel=255,
+                               interface="USB     \tserial_number: 30302e31",
+                               usb_serial=0x30302e31,
+                               sysfslink="../devices/pci0000:00/0000:00:1d.0/"
+                               "usb4/4-1/4-1.2/4-1.2:1.0/host6/target6:0:0/"
+                               "6:0:0:0/block/sdd",
+                               sysfspath="/sys/firmware/edd/int13_dev80/"),
+            0x81: FakeEddEntry(version="0x30", mbr_sig="0x00033091",
+                               sectors=312581808, host_bus="PCI", type="SATA",
+                               pci_dev="00:1f.2", channel=255, ata_device=2,
+                               interface="SATA    \tdevice: 2",
+                               sysfspath="/sys/firmware/edd/int13_dev81/",
+                               sysfslink="../devices/pci0000:00/0000:00:1f.2/"
+                               "ata3/host2/target2:0:0/2:0:0:0/block/sdc"),
+            0x82: FakeEddEntry(version="0x30", mbr_sig="0x00000000",
+                               sectors=156301488, host_bus="PCI", type="SATA",
+                               pci_dev="00:1f.2", channel=255, ata_device=1,
+                               interface="SATA    \tdevice: 1",
+                               sysfspath="/sys/firmware/edd/int13_dev82/",
+                               sysfslink="../devices/pci0000:00/0000:00:1f.2/"
+                               "ata2/host1/target1:0:0/1:0:0:0/block/sdb"),
+            0x83: FakeEddEntry(version="0x30", mbr_sig="0x00000000",
+                               sectors=312581808, host_bus="PCI", type="SATA",
+                               pci_dev="00:1f.2", channel=255, ata_device=0,
+                               interface="SATA    \tdevice: 0",
+                               sysfspath="/sys/firmware/edd/int13_dev83/",
+                               sysfslink="../devices/pci0000:00/0000:00:1f.2/"
+                               "ata1/host0/target0:0:0/0:0:0:0/block/sda"),
+        }
+
+        edd_dict = edd.get_edd_dict(devices,
+                                    root=self.root('strawberry_mountain'))
+        self.debug('edd_dict: %s', edd_dict)
+        debugs = [
+            ("edd: data extracted from 0x%x:%r", 0x80, fakeedd[0x80]),
+            ("edd: data extracted from 0x%x:%r", 0x81, fakeedd[0x81]),
+            ("edd: data extracted from 0x%x:%r", 0x82, fakeedd[0x82]),
+            ("edd: data extracted from 0x%x:%r", 0x83, fakeedd[0x83]),
+            ("edd: found device 0x%x at %s", 0x80,
+             '/sys/firmware/edd/int13_dev80/'),
+            ("edd: found device 0x%x at %s", 0x81,
+             '/sys/firmware/edd/int13_dev81/'),
+            ("edd: found device 0x%x at %s", 0x82,
+             '/sys/firmware/edd/int13_dev82/'),
+            ("edd: found device 0x%x at %s", 0x83,
+             '/sys/firmware/edd/int13_dev83/'),
+        ]
+        infos = [
+            ("edd: MBR signature on %s is zero. new disk image?", "sda"),
+            ("edd: MBR signature on %s is zero. new disk image?", "sdb"),
+            ("edd: collected mbr signatures: %s", { 'sdc': '0x00033091',
+                                                    'sdd': '0x91271645',
+                                                    }),
+            ("edd: matched 0x%x to %s using MBR sig", 0x80, "sdd"),
+            ("edd: matched 0x%x to %s using PCI dev", 0x81, "sdc"),
+            ("edd: matched 0x%x to %s using PCI dev", 0x82, "sdb"),
+            ("edd: matched 0x%x to %s using PCI dev", 0x83, "sda"),
+            ('edd: Could not find Virtio device for pci dev %s channel %s', '00:1f.2', 255),
+            ('edd: Could not find Virtio device for pci dev %s channel %s', '00:1f.2', 255),
+            ('edd: Could not find Virtio device for pci dev %s channel %s', '00:1f.2', 255),
+            ('edd: Could not find Virtio device for pci dev %s channel %s', 'ff:ff.255', 255)
+        ]
+        warnings = [
+            ("edd: interface type %s is not implemented (%s)", "USB",
+                "/sys/firmware/edd/int13_dev80/"),
+            ("edd: interface details: %s", "USB     \tserial_number: 30302e31"),
+            ('edd: using possible extra match for ATA device %s channel %s ata %d pmp %s: %s', '00:1f.2', 255, 1, None, '/sys/block/sdb'),
+            ('edd: using possible extra match for ATA device %s channel %s ata %d pmp %s: %s', '00:1f.2', 255, 2, None, '/sys/block/sdc'),
+        ]
+        self.check_logs(debugs=debugs, infos=infos, warnings=warnings)
+        lib.assertVerboseEqual(edd_dict["sda"], 0x83)
+        lib.assertVerboseEqual(edd_dict["sdb"], 0x82)
+        lib.assertVerboseEqual(edd_dict["sdc"], 0x81)
+        lib.assertVerboseEqual(edd_dict["sdd"], 0x80)
+        lib.assertVerboseEqual(len(edd_dict), 4)


-- 
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/11a2c48de1443d412eb8f2ac03b4eed57d00b4b9


More information about the anaconda-patches mailing list