naccyde / rpms / systemd

Forked from rpms/systemd a year ago
Clone
698723
From 94ad224240140a7287f9e2be5905b9c506350193 Mon Sep 17 00:00:00 2001
4bf4e7
From: Michal Sekletar <msekleta@redhat.com>
4bf4e7
Date: Mon, 17 May 2021 15:54:10 +0200
4bf4e7
Subject: [PATCH] test/udev-test.pl: drop test cases that add mutliple devices
4bf4e7
4bf4e7
[msekleta: It is easier to delete test-cases that would make
4bf4e7
udev test fail. Once we reintroduce the fix for link_update()
4bf4e7
we will revert this commit.]
4bf4e7
698723
Related: #1942299
4bf4e7
---
4bf4e7
 test/udev-test.pl | 179 ----------------------------------------------
4bf4e7
 1 file changed, 179 deletions(-)
4bf4e7
4bf4e7
diff --git a/test/udev-test.pl b/test/udev-test.pl
4bf4e7
index 0612859cda..343d9c01ae 100755
4bf4e7
--- a/test/udev-test.pl
4bf4e7
+++ b/test/udev-test.pl
4bf4e7
@@ -2041,185 +2041,6 @@ TAGS=="foo", SYMLINK+="found"
4bf4e7
 TAGS=="aaa", SYMLINK+="bad"
4bf4e7
 EOF
4bf4e7
         },
4bf4e7
-        {
4bf4e7
-                desc            => "multiple devices",
4bf4e7
-                devices => [
4bf4e7
-                        {
4bf4e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
4bf4e7
-                                exp_links       => ["part-1"],
4bf4e7
-                        },
4bf4e7
-                        {
4bf4e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
4bf4e7
-                                exp_links       => ["part-5"],
4bf4e7
-                        },
4bf4e7
-                        {
4bf4e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6",
4bf4e7
-                                exp_links       => ["part-6"],
4bf4e7
-                        },
4bf4e7
-                        {
4bf4e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7",
4bf4e7
-                                exp_links       => ["part-7"],
4bf4e7
-                        },
4bf4e7
-                        {
4bf4e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8",
4bf4e7
-                                exp_links       => ["part-8"],
4bf4e7
-                        },
4bf4e7
-                        {
4bf4e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9",
4bf4e7
-                                exp_links       => ["part-9"],
4bf4e7
-                        },
4bf4e7
-                        {
4bf4e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda10",
4bf4e7
-                                exp_links       => ["part-10"],
4bf4e7
-                        },
4bf4e7
-                    ],
4bf4e7
-                rules          => <
4bf4e7
-SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sda?*", ENV{DEVTYPE}=="partition", SYMLINK+="part-%n"
4bf4e7
-EOF
4bf4e7
-        },
4bf4e7
-        {
4bf4e7
-                desc            => "multiple devices, same link name, positive prio",
4bf4e7
-                repeat          => 100,
4bf4e7
-                devices => [
4bf4e7
-                        {
4bf4e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
4bf4e7
-                                exp_links       => ["part-1"],
4bf4e7
-                                not_exp_links   => ["partition"],
4bf4e7
-                        },
4bf4e7
-                        {
4bf4e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
4bf4e7
-                                exp_links       => ["part-5"],
4bf4e7
-                                not_exp_links   => ["partition"],
4bf4e7
-                        },
4bf4e7
-                        {
4bf4e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6",
4bf4e7
-                                not_exp_links   => ["partition"],
4bf4e7
-                                exp_links       => ["part-6"],
4bf4e7
-                        },
4bf4e7
-                        {
4bf4e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7",
4bf4e7
-                                exp_links       => ["part-7", "partition"],
4bf4e7
-                        },
4bf4e7
-                        {
4bf4e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8",
4bf4e7
-                                not_exp_links   => ["partition"],
4bf4e7
-                                exp_links       => ["part-8"],
4bf4e7
-                        },
4bf4e7
-                        {
4bf4e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9",
4bf4e7
-                                not_exp_links   => ["partition"],
4bf4e7
-                                exp_links       => ["part-9"],
4bf4e7
-                        },
4bf4e7
-                        {
4bf4e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda10",
4bf4e7
-                                not_exp_links   => ["partition"],
4bf4e7
-                                exp_links       => ["part-10"],
4bf4e7
-                        },
4bf4e7
-                    ],
4bf4e7
-                rules          => <
4bf4e7
-SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sda?*", ENV{DEVTYPE}=="partition", SYMLINK+="part-%n"
4bf4e7
-SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sda?*", ENV{DEVTYPE}=="partition", SYMLINK+="partition"
4bf4e7
-KERNEL=="*7", OPTIONS+="link_priority=10"
4bf4e7
-EOF
4bf4e7
-        },
4bf4e7
-        {
4bf4e7
-                desc            => "multiple devices, same link name, negative prio",
4bf4e7
-                devices => [
4bf4e7
-                        {
4bf4e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
4bf4e7
-                                exp_links       => ["part-1"],
4bf4e7
-                                not_exp_links   => ["partition"],
4bf4e7
-                        },
4bf4e7
-                        {
4bf4e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
4bf4e7
-                                exp_links       => ["part-5"],
4bf4e7
-                                not_exp_links   => ["partition"],
4bf4e7
-                        },
4bf4e7
-                        {
4bf4e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6",
4bf4e7
-                                not_exp_links   => ["partition"],
4bf4e7
-                                exp_links       => ["part-6"],
4bf4e7
-                        },
4bf4e7
-                        {
4bf4e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7",
4bf4e7
-                                exp_links       => ["part-7", "partition"],
4bf4e7
-                        },
4bf4e7
-                        {
4bf4e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8",
4bf4e7
-                                not_exp_links   => ["partition"],
4bf4e7
-                                exp_links       => ["part-8"],
4bf4e7
-                        },
4bf4e7
-                        {
4bf4e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9",
4bf4e7
-                                not_exp_links   => ["partition"],
4bf4e7
-                                exp_links       => ["part-9"],
4bf4e7
-                        },
4bf4e7
-                        {
4bf4e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda10",
4bf4e7
-                                not_exp_links   => ["partition"],
4bf4e7
-                                exp_links       => ["part-10"],
4bf4e7
-                        },
4bf4e7
-                    ],
4bf4e7
-                rules          => <
4bf4e7
-SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sda?*", ENV{DEVTYPE}=="partition", SYMLINK+="part-%n"
4bf4e7
-SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sda?*", ENV{DEVTYPE}=="partition", SYMLINK+="partition"
4bf4e7
-KERNEL!="*7", OPTIONS+="link_priority=-10"
4bf4e7
-EOF
4bf4e7
-        },
4bf4e7
-        {
4bf4e7
-                desc            => "multiple devices, same link name, positive prio, sleep",
4bf4e7
-                devices => [
4bf4e7
-                        {
4bf4e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
4bf4e7
-                                exp_links       => ["part-1"],
4bf4e7
-                                not_exp_links   => ["partition"],
4bf4e7
-                        },
4bf4e7
-                        {
4bf4e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
4bf4e7
-                                exp_links       => ["part-5"],
4bf4e7
-                                not_exp_links   => ["partition"],
4bf4e7
-                        },
4bf4e7
-                        {
4bf4e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6",
4bf4e7
-                                not_exp_links   => ["partition"],
4bf4e7
-                                exp_links       => ["part-6"],
4bf4e7
-                        },
4bf4e7
-                        {
4bf4e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7",
4bf4e7
-                                exp_links       => ["part-7", "partition"],
4bf4e7
-                        },
4bf4e7
-                        {
4bf4e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8",
4bf4e7
-                                not_exp_links   => ["partition"],
4bf4e7
-                                exp_links       => ["part-8"],
4bf4e7
-                        },
4bf4e7
-                        {
4bf4e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9",
4bf4e7
-                                not_exp_links   => ["partition"],
4bf4e7
-                                exp_links       => ["part-9"],
4bf4e7
-                        },
4bf4e7
-                        {
4bf4e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda10",
4bf4e7
-                                not_exp_links   => ["partition"],
4bf4e7
-                                exp_links       => ["part-10"],
4bf4e7
-                        },
4bf4e7
-                    ],
4bf4e7
-                sleep_us       => 10000,
4bf4e7
-                rules          => <
4bf4e7
-SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sda?*", ENV{DEVTYPE}=="partition", SYMLINK+="part-%n"
4bf4e7
-SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sda?*", ENV{DEVTYPE}=="partition", SYMLINK+="partition"
4bf4e7
-KERNEL=="*7", OPTIONS+="link_priority=10"
4bf4e7
-EOF
4bf4e7
-        },
4bf4e7
-        {
4bf4e7
-                desc           => 'all_block_devs',
4bf4e7
-                generator      => expect_for_some("\\/sda6\$", ["blockdev"]),
4bf4e7
-                repeat         => 10,
4bf4e7
-                rules          => <
4bf4e7
-SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sd*", SYMLINK+="blockdev"
4bf4e7
-KERNEL=="sda6", OPTIONS+="link_priority=10"
4bf4e7
-EOF
4bf4e7
-        }
4bf4e7
 );
4bf4e7
 
4bf4e7
 sub create_rules {