]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
TEST-64-UDEV-STORAGE: Make nvme_subsystem expected pci symlinks more generic
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 28 Jun 2024 12:20:34 +0000 (14:20 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 28 Jun 2024 12:20:34 +0000 (14:20 +0200)
When running the test on aarch64 the symlinks look as follows:

"""
[root@H ~]# ls /dev/disk/by-path
platform-4010000000.pcie-pci-0000:00:04.0-scsi-0:0:0:0       platform-4010000000.pcie-pci-0000:00:04.0-scsi-0:0:0:0-part1  platform-4010000000.pcie-pci-0000:00:05.0-nvme-16
platform-4010000000.pcie-pci-0000:00:04.0-scsi-0:0:0:0-part  platform-4010000000.pcie-pci-0000:00:04.0-scsi-0:0:0:0-part2  platform-4010000000.pcie-pci-0000:00:05.0-nvme-17
"""

So let's make the PCI patterns a little more generic so they match
both the x86 and the aarch64 paths.

test/units/TEST-64-UDEV-STORAGE.sh

index 5ddddf549bb29fc731fe2341086e01550fe867b3..431b5305e4983077b3def5ab10ee7b24934a3bcc 100755 (executable)
@@ -231,8 +231,8 @@ testcase_nvme_subsystem() {
         /dev/disk/by-id/nvme-QEMU_NVMe_Ctrl_deadbeef_16
         /dev/disk/by-id/nvme-QEMU_NVMe_Ctrl_deadbeef_17
         # Shared namespaces
-        /dev/disk/by-path/pci-*-nvme-16
-        /dev/disk/by-path/pci-*-nvme-17
+        /dev/disk/by-path/*pci*-nvme-16
+        /dev/disk/by-path/*pci*-nvme-17
     )
 
     udevadm wait --settle --timeout=30 "${expected_symlinks[@]}"