]> www.infradead.org Git - users/sagi/blktests.git/commitdiff
common/rc: allow 5-digit domains in _get_pci_dev_from_blkdev
authorJon Derrick <jonathan.derrick@intel.com>
Mon, 27 Nov 2017 21:49:05 +0000 (14:49 -0700)
committerOmar Sandoval <osandov@fb.com>
Tue, 28 Nov 2017 00:23:49 +0000 (16:23 -0800)
At least one driver (VMD) uses 32-bit pci domains, but is effectively
limited to 5-digit domains. Allow tests to access devices with 4-5 digit
domains.

Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>
common/rc

index 6b29c2bc3add60401ed2c7418aadd9c428042dbc..09ce4efe7109dc976a6df724e88b18c074aa1d3d 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -138,7 +138,7 @@ _test_dev_is_pci() {
 
 _get_pci_dev_from_blkdev() {
        readlink -f "$TEST_DEV_SYSFS/device" | \
-               grep -Eo '[0-9a-f]{4}:[0-9a-f]{2}:[0-9a-f]{2}\.[0-9a-f]' | \
+               grep -Eo '[0-9a-f]{4,5}:[0-9a-f]{2}:[0-9a-f]{2}\.[0-9a-f]' | \
                tail -1
 }